Add desktop auto-update (Tauri v2 updater)#317
Merged
Conversation
Users no longer need to manually reinstall the desktop app to get new
versions. The app checks for updates on launch and from the tray menu,
verifies minisign-signed bundles against a baked-in pubkey, and installs
them in place.
Changes:
- `modelrelay-desktop`: add tauri-plugin-updater/dialog/process, a
capability file for v2's explicit-permissions model, a new updater
module with launch-check + manual-check flows, tray menu entry, and a
Settings card showing version + progress.
- `modelrelay-cloud`: new `/updater/desktop/{target}/{arch}/{current_version}`
route that returns Tauri's dynamic updater JSON by looking up the
latest `desktop-v*` GitHub release (5-minute cache) and reading the
matching `.sig` file contents. 204 No Content when the client is at or
ahead of latest, or when no signed artifact exists for that target.
- `.github/workflows/desktop-release.yml`: pass TAURI_SIGNING_PRIVATE_KEY
/ _PASSWORD env vars so tauri-action signs the updater bundles.
- `docs/auto-updates.md`: end-to-end explanation, release workflow,
signing-key rotation, troubleshooting.
All existing modelrelay-cloud tests still pass; six new tests cover
semver comparison, platform→suffix mapping, and bundle/sig pairing.
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.
Why
You wrote: "I am worried that if I install it I'll have to keep installing it. please work out an auto-update mechanism and make sure it works on all platforms."
This PR wires up Tauri v2's updater plugin end-to-end so users never have to manually reinstall. The app silently checks on launch, offers to install when a new `desktop-v*` release is published, verifies a minisign signature against the baked-in pubkey, and installs in place.
How it works
.AppImage, macOS.app.tar.gz(aarch64 + x64), Windows-setup.exe(NSIS).Changes
Action required before merge
Add two GitHub Actions secrets to `ericflo/modelrelay`:
I generated a keypair locally. The public key is already committed to `tauri.conf.json`. You'll receive the private key out-of-band (not in this PR body) to add as the secret above — or you can regenerate your own with `cargo tauri signer generate` and update both the secret and the `pubkey` field.
Without those secrets set, the release workflow still builds installers but won't upload `.sig` files, and the cloud updater endpoint will return 204 (refuses to serve unsigned bundles). Safe fallback, but no auto-update until keys are configured.
Rollout
Test plan
🤖 Generated with Claude Code