From a1cd0cd0de553dab8a6fd876d819b3bd462f8fe3 Mon Sep 17 00:00:00 2001 From: Snowy7 Date: Wed, 25 Feb 2026 10:54:29 +0300 Subject: [PATCH 1/2] Add Linux ARM64 (aarch64) build support - Add arm64 to Linux AppImage target architectures in package.json - Add dedicated linux-arm64 package job in release workflow using ubuntu-24.04-arm runner - Add linux-arm64 build job in CI workflow for PR validation - Release job now depends on both x64 and arm64 package jobs Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 23 ++++++++++++++++++++ .github/workflows/release.yml | 41 ++++++++++++++++++++++++++++++++++- package.json | 3 ++- 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b36b1e..65d6ed7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,3 +71,26 @@ jobs: - name: Build run: npm run build + + build-linux-arm64: + name: Build (linux-arm64) + runs-on: ubuntu-24.04-arm + needs: lint-typecheck-test + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9002aa5..989874a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,10 +94,49 @@ jobs: if-no-files-found: ignore retention-days: 30 + package-linux-arm64: + name: Package (linux-arm64) + runs-on: ubuntu-24.04-arm + needs: validate + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Package + run: npx electron-builder --linux --arm64 --publish never + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: sncode-linux-arm64 + path: | + release/*.AppImage + release/*.yml + release/*.yaml + if-no-files-found: ignore + retention-days: 30 + release: name: Create Release runs-on: ubuntu-latest - needs: package + needs: [package, package-linux-arm64] # Only create a release when triggered by a tag push or when a version is specified if: startsWith(github.ref, 'refs/tags/v') || inputs.version != '' diff --git a/package.json b/package.json index 1877290..2ae1e6d 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,8 @@ { "target": "AppImage", "arch": [ - "x64" + "x64", + "arm64" ] } ], From 1e3e286c2ccfc46daf84bba29a1ab7829d5b79cb Mon Sep 17 00:00:00 2001 From: Snowy7 Date: Wed, 25 Feb 2026 11:08:36 +0300 Subject: [PATCH 2/2] Revert arm64 from package.json linux arch list The dedicated package-linux-arm64 job passes --linux --arm64 explicitly, so keeping arm64 in package.json would cause the x64 ubuntu-latest job to attempt cross-arch AppImage builds that would fail. Co-Authored-By: Claude Opus 4.6 --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 2ae1e6d..1877290 100644 --- a/package.json +++ b/package.json @@ -129,8 +129,7 @@ { "target": "AppImage", "arch": [ - "x64", - "arm64" + "x64" ] } ],