From c8ccff0669c60b89aadf0e0c0146e39b11024967 Mon Sep 17 00:00:00 2001 From: H-Chris233 Date: Mon, 4 May 2026 01:02:44 +0800 Subject: [PATCH] Avoid macOS updater asset collisions across architectures Intel and Apple Silicon macOS jobs produced the same updater bundle filename, which let one matrix job overwrite the other release asset and could point both architecture manifests to a single binary. Rename macOS updater bundles per architecture before release upload and prefer arch-specific artifact lookup when generating updater manifests. Constraint: Keep existing updater manifest format and release action usage Rejected: Split macOS uploads into separate release jobs | larger workflow churn Confidence: high Scope-risk: narrow Reversibility: clean Directive: Any new macOS updater lane must keep unique asset names to preserve manifest correctness Tested: release-tauri.yml YAML parse; diff audit for rename+manifest path alignment Not-tested: End-to-end tagged GitHub Actions release run --- .github/workflows/release-tauri.yml | 12 ++++++++++++ openless-all/app/scripts/write-updater-manifest.mjs | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-tauri.yml b/.github/workflows/release-tauri.yml index 7ac2b68e..2c3588c8 100644 --- a/.github/workflows/release-tauri.yml +++ b/.github/workflows/release-tauri.yml @@ -217,6 +217,18 @@ jobs: npm run tauri -- build --bundles deb,rpm,appimage fi + - name: Disambiguate macOS updater bundle filename + if: startsWith(matrix.platform, 'macos') && env.TAURI_SIGNING_PRIVATE_KEY != '' + shell: bash + working-directory: 'openless-all/app/src-tauri/target/release/bundle/macos' + run: | + if [ -f OpenLess.app.tar.gz ]; then + mv OpenLess.app.tar.gz "OpenLess_${{ matrix.updater-arch }}.app.tar.gz" + fi + if [ -f OpenLess.app.tar.gz.sig ]; then + mv OpenLess.app.tar.gz.sig "OpenLess_${{ matrix.updater-arch }}.app.tar.gz.sig" + fi + - name: Write updater manifest if: env.TAURI_SIGNING_PRIVATE_KEY != '' shell: bash diff --git a/openless-all/app/scripts/write-updater-manifest.mjs b/openless-all/app/scripts/write-updater-manifest.mjs index eb85a906..eb0e7762 100755 --- a/openless-all/app/scripts/write-updater-manifest.mjs +++ b/openless-all/app/scripts/write-updater-manifest.mjs @@ -17,7 +17,10 @@ const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.me const bundleDir = fileURLToPath(new URL('../src-tauri/target/release/bundle/', import.meta.url)); const candidatesByTarget = { - darwin: ['macos/OpenLess.app.tar.gz'], + darwin: [ + `macos/OpenLess_${arch}.app.tar.gz`, + 'macos/OpenLess.app.tar.gz', + ], windows: ['nsis/OpenLess_*_x64-setup.exe', 'nsis/OpenLess*_x64-setup.exe'], linux: ['appimage/OpenLess_*.AppImage', 'appimage/OpenLess*.AppImage'], };