ci(release): clear cached tauri bundle outputs before bundling#12
Merged
Merged
Conversation
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/<triple>/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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.1.8 arm64 produced inconsistent artifacts:
Both should derive from the same `.app` directory; the discrepancy means tauri-bundler kept a stale `.app.tar.gz` from a previous run instead of regenerating it from the current `.app`.
Root cause
`actions/cache@v4` caches `src-tauri/target/`, which on a re-run includes the prior `bundle/macos/AOS Mail.app.tar.gz`. tauri-bundler treats the cached tarball as up-to-date even when the underlying `.app` (and the binaries that go into it) have changed. So when PR #11 fixed `prepare-node` to bundle the real 113 MB Node binary, the rebuilt `.app` paired up with a tarball still containing the previous run's 86 KB stub.
Fix
A new step right before "Strip AppleDouble metadata" runs:
```yaml
rm -rf src-tauri/target/${{ matrix.target }}/release/bundle/
```
This wipes only the bundle outputs (`.app`, `.dmg`, updater tarball), leaving the Rust compilation cache intact — so cargo's incremental compile is unaffected, only bundling is forced to regenerate.
After merge
I retag v0.1.8 yet again and verify the .app.tar.gz finally matches the .dmg.
🤖 Generated with Claude Code