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
This commit is contained in:
parent
e20228da6f
commit
aaa48d65a2
@ -349,8 +349,9 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci --legacy-peer-deps
|
npm ci --legacy-peer-deps
|
||||||
|
rustup target add aarch64-unknown-linux-gnu
|
||||||
cargo install tauri-cli --version "^2" --locked
|
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
|
- name: Upload artifacts
|
||||||
env:
|
env:
|
||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
@ -377,7 +378,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Release ID: $RELEASE_ID"
|
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" \))
|
\( -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" \))
|
||||||
if [ -z "$ARTIFACTS" ]; then
|
if [ -z "$ARTIFACTS" ]; then
|
||||||
echo "ERROR: No Linux arm64 artifacts were found to upload."
|
echo "ERROR: No Linux arm64 artifacts were found to upload."
|
||||||
|
|||||||
@ -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 amd64 artifacts were found to upload.");
|
||||||
expect(workflow).toContain("ERROR: No Linux arm64 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", () => {
|
it("fails windows uploads when no artifacts are found", () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user