feat(gui): in-app auto-updater via tauri-plugin-updater#19
Merged
Conversation
Adds the Tauri 2 updater + process plugins so an installed rompatch app self-checks against GitHub Releases on launch, surfaces an "Install & restart" banner, downloads the signed .app.tar.gz, verifies it against an embedded ed25519 pubkey, and relaunches. CI now builds and attaches the updater artifacts (.app.tar.gz, .sig) and a latest.json manifest alongside the existing .dmg on every tag. Build provenance attestation is extended to cover the tarball. Out of scope: CLI distribution, crates.io publishing, automated version bumping. Tags are still cut manually. Setup before the first release: see the PR description. Co-Authored-By: Claude
Two CI fixes for the updater PR: * webpki-root-certs, pulled in transitively by the new tauri-plugin-updater -> reqwest -> rustls-platform-verifier path, ships under CDLA-Permissive-2.0. Add it to the deny.toml allowed list. * The gui job's Swatinem/rust-cache step uses a static `key: gui` and was restoring a stale ~/.cargo/bin from a prior run, clobbering the proxies that dtolnay/rust-toolchain freshly installed. cargo then invoked rustup-init and failed with "unexpected argument 'check'". Set `cache-bin: false` so the cache only handles registry + target. Co-Authored-By: Claude
The gui job got `cache-bin: false` in the previous commit. Applying it to test, fmt+clippy, coverage, and fuzz too: any rust-cache step paired with dtolnay/rust-toolchain can restore a stale ~/.cargo/bin on a cache hit and clobber the freshly-installed proxies. macos-latest just hit this in the test matrix. Co-Authored-By: Claude
Replaces the placeholder pubkey in tauri.conf.json with the real minisign public key. The matching private key + password are stored as repo secrets (TAURI_SIGNING_PRIVATE_KEY and TAURI_SIGNING_PRIVATE_KEY_PASSWORD) and used by the gui job to sign the .app.tar.gz updater artifact at release time. Co-Authored-By: Claude
3 tasks
GregTheGreek
added a commit
that referenced
this pull request
May 14, 2026
## Summary Bumps the workspace version from `0.1.0` to `0.2.0` so the first release that ships the in-app updater (PR #19) is detectable as "new" by installed `v0.1.0` copies. Touches: - `Cargo.toml` `workspace.package.version` (picked up by all three crates via `version.workspace = true`) - `crates/rompatch/Cargo.toml` and `crates/rompatch-gui/Cargo.toml` explicit `rompatch-core` deps (both pinned) - `crates/rompatch-gui/ui/package.json` (cosmetic; Tauri reads the .app version from `Cargo.toml`) - `Cargo.lock` regenerated No code changes. ## After merge 1. `git -c core.sshCommand="ssh -i ~/.ssh/gwm-claude" push origin v0.2.0` (after tagging the merge commit) 2. The `gui` job fires on `refs/tags/v*` and attaches `.dmg`, `.app.tar.gz`, `.app.tar.gz.sig`, and `latest.json` to the release. 3. Installed `v0.1.0` apps see the update banner on next launch. ## Test plan - [x] `cargo check --workspace --exclude rompatch-gui` clean - [x] `cargo check -p rompatch-gui --release` clean - [ ] After merge: tag `v0.2.0`, confirm release assets + `latest.json` reachable at `releases/latest/download/latest.json`
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
Wires up the Tauri 2 in-app updater so an installed
rompatchappself-checks against GitHub Releases on launch and offers to install +
restart on the next version. Out of scope: CLI distribution, crates.io
publishing, version-bumping automation. Tags are still cut manually.
What's in here
Rust side
crates/rompatch-gui/Cargo.toml- addtauri-plugin-updater = "=2.10.1"+tauri-plugin-process = "=2.3.1"crates/rompatch-gui/src/lib.rs- register both plugins on the buildercrates/rompatch-gui/tauri.conf.jsonbundle.createUpdaterArtifacts: trueso each build emits.app.tar.gz+.sigplugins.updaterblock with the pubkey placeholder + endpoint pointing atreleases/latest/download/latest.json(GitHub redirects this URL to whichever release is marked latest)"version": "0.1.0"so Tauri reads from the workspaceCargo.toml(single source of truth)crates/rompatch-gui/capabilities/default.json- grantupdater:default+process:allow-restartFrontend
ui/package.json-@tauri-apps/plugin-updater@2.10.1+@tauri-apps/plugin-process@2.3.1ui/src/lib/updater.ts- smalluseUpdaterhook that wrapscheck()and exposes download progressui/src/components/UpdateBanner.tsx- banner at the top of the main panel with an Install + restart buttonui/src/App.tsx- mount the bannerCI (
.github/workflows/ci.ymlguijob)TAURI_SIGNING_PRIVATE_KEY+TAURI_SIGNING_PRIVATE_KEY_PASSWORDto bothtauri buildstepslatest.jsonfrom the signature file.app.tar.gz,.app.tar.gz.sig, andlatest.jsonto the GitHub Releasesubject-pathto cover the tarballRequired setup before the first release after merge
Important
The current
pubkeyintauri.conf.jsonis a placeholder. CI will fail on the first tag push until the steps below are done. Generate the keypair locally, commit the real pubkey, and add the two secrets - then tag.TAURI_SIGNING_PRIVATE_KEY= full contents of~/.tauri/rompatch.keyTAURI_SIGNING_PRIVATE_KEY_PASSWORD= the password chosen aboveREPLACE_WITH_TAURI_UPDATER_PUBLIC_KEYincrates/rompatch-gui/tauri.conf.jsonwith the public key printed by step 1.v0.2.0- the existingguijob will build the signed updater artifacts and attach everything to the release.Risks / gotchas
.appfor Gatekeeper, Tauri signs the.app.tar.gzfor the in-app updater. Both are required for a smooth post-install launch..appwill be Gatekeeper-quarantined and silently fail to launch.Test plan
cargo check -p rompatch-gui --release- cleancargo clippy -p rompatch-gui --all-targets -- -D warnings- cleancargo fmt --all -- --check- cleanpnpm typecheck- cleancargo tauri info- resolves both new plugins (Rust + JS sides)v0.2.0, confirm.app.tar.gz,.app.tar.gz.sig, andlatest.jsonattach to the release.dmg, launch thev0.2.0-aware build, confirm the banner appears andInstall & restartdownloads + relaunches