Skip to content

ci(release): clear cached tauri bundle outputs before bundling#12

Merged
mrdulasolutions merged 1 commit into
mainfrom
claude/clean-bundle-dir-before-tauri
May 13, 2026
Merged

ci(release): clear cached tauri bundle outputs before bundling#12
mrdulasolutions merged 1 commit into
mainfrom
claude/clean-bundle-dir-before-tauri

Conversation

@mrdulasolutions
Copy link
Copy Markdown
Owner

Summary

v0.1.8 arm64 produced inconsistent artifacts:

  • `AOS.Mail_0.1.8_aarch64.dmg` (47 MB) ← contains the correct 113 MB `aos-mail-node`
  • `AOS.Mail_aarch64.app.tar.gz` (9.4 MB) ← contains an 86 KB `aos-mail-node` stub

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

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>
@mrdulasolutions mrdulasolutions merged commit 016dfa1 into main May 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant