From a8d559e4c640024cf17384c459610663a74cf715 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sat, 24 Oct 2026 16:17:58 +0700 Subject: [PATCH 1/3] ci(linux): on stable release publish dispatch exact-tag AppImage build with firmware prerequisite --- .../arstack-studio-linux-auto-release.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/arstack-studio-linux-auto-release.yml diff --git a/.github/workflows/arstack-studio-linux-auto-release.yml b/.github/workflows/arstack-studio-linux-auto-release.yml new file mode 100644 index 000000000..5c8b65f7b --- /dev/null +++ b/.github/workflows/arstack-studio-linux-auto-release.yml @@ -0,0 +1,47 @@ +name: Attach Linux AppImage On Stable Release + +on: + release: + types: [published] + pull_request: + paths: + - '.github/workflows/arstack-studio-linux-auto-release.yml' + +permissions: + contents: read + actions: write + +jobs: + dispatch-matched-linux-package: + name: Build tested AppImage for newly published stable tag + if: ${{ github.event_name == 'release' && !github.event.release.draft && !github.event.release.prerelease }} + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Check published release assets before dispatch + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.event.release.tag_name }} + run: | + set -euo pipefail + gh api "repos/$GITHUB_REPOSITORY/releases/tags/$TAG" > release.json + python3 - <<'PY' + import json + r=json.load(open('release.json')) + assert not r['draft'] and not r['prerelease'], 'Only stable release builds are eligible' + assets={a['name'] for a in r['assets']} + assert 'firmware-manifest.json' in assets, 'Matched firmware manifest not published yet' + assert any(n.lower().endswith('.bin') for n in assets), 'Matched board firmware not published yet' + assert not any(n.endswith('.AppImage') for n in assets), 'Linux AppImage already available; no dispatch needed' + print('PASS: matching firmware assets published; ready to package Linux Studio') + PY + + - name: Dispatch exact-tag Linux AppImage build, smoke and attach workflow + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ github.event.release.tag_name }} + run: | + gh workflow run arstack-studio-linux-appimage.yml \ + --repo "$GITHUB_REPOSITORY" --ref main \ + --field release_tag="$TAG" + echo "Dispatched Linux build for release tag: $TAG" From 26f80b830cd577b41f85eb73043346efffb515c0 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sat, 24 Oct 2026 16:18:24 +0700 Subject: [PATCH 2/3] fix(linux): skip automatic dispatch cleanly when release already carries AppImage --- .../workflows/arstack-studio-linux-auto-release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/arstack-studio-linux-auto-release.yml b/.github/workflows/arstack-studio-linux-auto-release.yml index 5c8b65f7b..11cc1576f 100644 --- a/.github/workflows/arstack-studio-linux-auto-release.yml +++ b/.github/workflows/arstack-studio-linux-auto-release.yml @@ -19,6 +19,7 @@ jobs: timeout-minutes: 5 steps: - name: Check published release assets before dispatch + id: eligibility env: GH_TOKEN: ${{ github.token }} TAG: ${{ github.event.release.tag_name }} @@ -26,17 +27,23 @@ jobs: set -euo pipefail gh api "repos/$GITHUB_REPOSITORY/releases/tags/$TAG" > release.json python3 - <<'PY' - import json + import json, os r=json.load(open('release.json')) assert not r['draft'] and not r['prerelease'], 'Only stable release builds are eligible' assets={a['name'] for a in r['assets']} assert 'firmware-manifest.json' in assets, 'Matched firmware manifest not published yet' assert any(n.lower().endswith('.bin') for n in assets), 'Matched board firmware not published yet' - assert not any(n.endswith('.AppImage') for n in assets), 'Linux AppImage already available; no dispatch needed' - print('PASS: matching firmware assets published; ready to package Linux Studio') + available=any(n.endswith('.AppImage') for n in assets) + with open(os.environ['GITHUB_OUTPUT'],'a') as out: + out.write(f"dispatch={'false' if available else 'true'}\\n") + if available: + print('SKIP: release already contains a Linux AppImage') + else: + print('PASS: matching firmware assets published; ready to package Linux Studio') PY - name: Dispatch exact-tag Linux AppImage build, smoke and attach workflow + if: ${{ steps.eligibility.outputs.dispatch == 'true' }} env: GH_TOKEN: ${{ github.token }} TAG: ${{ github.event.release.tag_name }} From 3af6658ebf8dc3a599526e5b3a4b327cb24ef196 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sat, 24 Oct 2026 16:19:12 +0700 Subject: [PATCH 3/3] fix(ci): newline-delimit GitHub Actions dispatch output correctly --- .github/workflows/arstack-studio-linux-auto-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arstack-studio-linux-auto-release.yml b/.github/workflows/arstack-studio-linux-auto-release.yml index 11cc1576f..e6afa5a82 100644 --- a/.github/workflows/arstack-studio-linux-auto-release.yml +++ b/.github/workflows/arstack-studio-linux-auto-release.yml @@ -35,7 +35,7 @@ jobs: assert any(n.lower().endswith('.bin') for n in assets), 'Matched board firmware not published yet' available=any(n.endswith('.AppImage') for n in assets) with open(os.environ['GITHUB_OUTPUT'],'a') as out: - out.write(f"dispatch={'false' if available else 'true'}\\n") + out.write(f"dispatch={'false' if available else 'true'}\n") if available: print('SKIP: release already contains a Linux AppImage') else: