CI: workflow tes (push/PR) + rilis otomatis dari tag

- .github/workflows/ci.yml: vet + go test -race di ubuntu-22.04
- .github/workflows/release.yml: tag vX.Y.Z -> tes, build AppImage dengan versi
  dari tag, lalu gh release create dengan aset AppImage + zsync dan catatan
  rilis otomatis (--generate-notes)
- README: rilis cukup 'git tag v1.1.0 && git push --tags'
This commit is contained in:
oxpoe committed 2026-10-13 08:07:56 +07:00
1 parent ffc412863a
commit ae2569a795
3 files changed
+96 -3

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
name: Release
# Tinggal bikin tag: git tag v1.2.0 && git push --tags
# Versi AppImage diambil dari nama tag, jadi tidak perlu ubah file apa pun.
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgl1-mesa-dev libx11-dev xorg-dev libxkbcommon-dev libwayland-dev
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Test
run: go test ./...
- name: Build AppImage
env:
# GH_USER/GH_REPO dipakai build.sh untuk menyisipkan info update zsync
# (gh-releases-zsync|<user>|<repo>|latest|lazyrun-*.AppImage.zsync)
GH_USER: ${{ github.repository_owner }}
GH_REPO: ${{ github.event.repository.name }}
run: |
VERSION="${GITHUB_REF_NAME#v}" ./build.sh
ls -lh dist/lazyrun-*.AppImage*
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
dist/lazyrun-*.AppImage \
dist/lazyrun-*.AppImage.zsync \
--title "LazyRun ${GITHUB_REF_NAME}" \
--generate-notes