From aaa48d65a2fce3caa4127903a334da692cb810cb Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sat, 4 Apr 2026 22:15:02 -0500 Subject: [PATCH] fix(ci): force explicit linux arm64 target for release artifacts Build linux arm64 bundles with --target aarch64-unknown-linux-gnu and upload from the target-specific bundle path so arm64 releases cannot accidentally publish amd64 artifacts. Made-with: Cursor --- .gitea/workflows/auto-tag.yml | 5 +++-- tests/unit/releaseWorkflowCrossPlatformArtifacts.test.ts | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/auto-tag.yml b/.gitea/workflows/auto-tag.yml index 33eb5011..3d3273fa 100644 --- a/.gitea/workflows/auto-tag.yml +++ b/.gitea/workflows/auto-tag.yml @@ -349,8 +349,9 @@ jobs: - name: Build run: | npm ci --legacy-peer-deps + rustup target add aarch64-unknown-linux-gnu cargo install tauri-cli --version "^2" --locked - CI=true cargo tauri build + CI=true cargo tauri build --target aarch64-unknown-linux-gnu - name: Upload artifacts env: RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} @@ -377,7 +378,7 @@ jobs: exit 1 fi echo "Release ID: $RELEASE_ID" - ARTIFACTS=$(find src-tauri/target/release/bundle -type f \ + ARTIFACTS=$(find src-tauri/target/aarch64-unknown-linux-gnu/release/bundle -type f \ \( -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" \)) if [ -z "$ARTIFACTS" ]; then echo "ERROR: No Linux arm64 artifacts were found to upload." diff --git a/tests/unit/releaseWorkflowCrossPlatformArtifacts.test.ts b/tests/unit/releaseWorkflowCrossPlatformArtifacts.test.ts index 9c5de48b..d801e2a8 100644 --- a/tests/unit/releaseWorkflowCrossPlatformArtifacts.test.ts +++ b/tests/unit/releaseWorkflowCrossPlatformArtifacts.test.ts @@ -20,6 +20,10 @@ describe("auto-tag release cross-platform artifact handling", () => { expect(workflow).toContain("ERROR: No Linux amd64 artifacts were found to upload."); expect(workflow).toContain("ERROR: No Linux arm64 artifacts were found to upload."); + expect(workflow).toContain("cargo tauri build --target aarch64-unknown-linux-gnu"); + expect(workflow).toContain( + "find src-tauri/target/aarch64-unknown-linux-gnu/release/bundle -type f", + ); }); it("fails windows uploads when no artifacts are found", () => {