From bc75f8e4d30f3f4f34c6566c6e3d4cb9a0e3a903 Mon Sep 17 00:00:00 2001 From: Refuhr Date: Wed, 8 Jul 2026 18:41:48 +0200 Subject: [PATCH] ci: add manual trigger and tag releases Add workflow_dispatch to allow manually running the build on any branch, and publish a GitHub Release for each pushed tag. Scope the continuous pre-release to master only. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/build.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a19752..ba36932 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,9 @@ on: push: branches: - "master" + tags: + - "*" + workflow_dispatch: jobs: buildlinux: name: Linux x64 @@ -158,6 +161,7 @@ jobs: name: "pre-release" runs-on: "ubuntu-latest" needs: [buildwindows, buildmacos86, buildmacos-arm64, buildlinux] + if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v3 @@ -177,7 +181,32 @@ jobs: SavvyCAN-Windows_x64_CIBuild.zip SavvyCAN-macOS_x64.dmg/SavvyCAN_x64.dmg SavvyCAN-macOS_ARM64.dmg/SavvyCAN_arm64.dmg - + + release: + name: "release" + runs-on: "ubuntu-latest" + needs: [buildwindows, buildmacos86, buildmacos-arm64, buildlinux] + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v3 + + - uses: actions/download-artifact@v4.1.7 + + - name: Zip Windows build + run: zip -r SavvyCAN-Windows_x64_CIBuild.zip SavvyCAN-Windows_x64 + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "${{ github.ref_name }}" + prerelease: false + title: "SavvyCAN ${{ github.ref_name }}" + files: | + SavvyCAN-Linux_x64.AppImage/SavvyCAN-*x86_64.AppImage + SavvyCAN-Windows_x64_CIBuild.zip + SavvyCAN-macOS_x64.dmg/SavvyCAN_x64.dmg + SavvyCAN-macOS_ARM64.dmg/SavvyCAN_arm64.dmg + notify: name: Notify Discord runs-on: ubuntu-latest