From b4c8481b0cac27c505c425dfa4c08366b4aa6d3a Mon Sep 17 00:00:00 2001 From: mrdulasolutions Date: Tue, 12 May 2026 20:00:10 -0400 Subject: [PATCH] ci(release): clear cached tauri bundle outputs before bundling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .dmg arm64 artifact for v0.1.8 has the correct 113 MB aos-mail-node binary, but the same release's `.app.tar.gz` contains an 86 KB stub. Same .app should be the source of both — something is preserving stale bundle output. actions/cache@v4 restores `src-tauri/target/`, which on a re-run includes the previously-bundled `bundle/macos/AOS Mail.app/`, `bundle/dmg/`, and `bundle/macos/AOS Mail.app.tar.gz`. tauri-bundler appears to treat the cached `.app.tar.gz` as up-to-date even when the .app it should derive from has changed — so a clean rebuild of the .app (after PR #11 fixed prepare-node to bundle the real Node binary) gets paired with a stale .app.tar.gz from a previous broken run. Fix: wipe `src-tauri/target//release/bundle/` before tauri-action runs. Forces every bundle artifact to be regenerated from the current .app. Doesn't invalidate the Rust compile cache (cargo build output lives elsewhere in target/), so re-builds are still fast. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 115f13c..040fb80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,6 +183,22 @@ jobs: echo "updater=false" >> "$GITHUB_OUTPUT" fi + - name: Clear cached tauri bundle outputs + run: | + # The cargo cache restores `src-tauri/target/`, including any + # previously-bundled `bundle/macos/AOS Mail.app/`, `bundle/dmg/`, + # and `bundle/macos/AOS Mail.app.tar.gz`. tauri-bundler treats + # those as up-to-date on incremental builds, so even when the + # underlying sidecar binaries change (e.g. the v0.1.8 saga where + # aos-mail-node went from an 86 KB stub to a 113 MB real binary), + # the cached `.app.tar.gz` survives untouched and gets uploaded + # to the release with the stale contents — the .dmg shows the + # new binary, the updater tarball shows the old one. + # + # Force tauri-bundler to regenerate every bundle artifact from + # scratch on each release. + rm -rf src-tauri/target/${{ matrix.target }}/release/bundle/ || true + - name: Strip AppleDouble metadata from build inputs run: | # Defense in depth alongside COPYFILE_DISABLE=1. Cache restore