Release process, version management, and auto-update system.
The release system provides:
- Automated GitHub Actions workflow for building releases
- Version management script for updating all version files
- Auto-updater for seamless user updates
- Cross-platform builds (macOS, Windows, Linux)
npm install -g @tauri-apps/cli
tauri signer generate -w ~/.tauri/myapp.key
# Outputs private key (saved) and public key (displayed)Add these secrets (Settings → Secrets and variables → Actions):
TAURI_PRIVATE_KEY: Content of~/.tauri/myapp.keyTAURI_SIGNING_PRIVATE_KEY_PASSWORD: Password you set (if any)
src-tauri/tauri.conf.json:
{
"plugins": {
"updater": {
"active": true,
"endpoints": [
"https://github.com/YOUR_USERNAME/YOUR_REPO/releases/latest/download/latest.json"
],
"dialog": false,
"pubkey": "YOUR_PUBLIC_KEY_FROM_STEP_1"
}
}
}Bundle info in tauri.conf.json:
- Update
publisher,shortDescription,longDescription - Update
productNameandidentifier
npm run release:prepare v1.0.0This will:
- Check git status is clean
- Run all quality checks (
npm run check:all) - Update versions in
package.json,Cargo.toml,tauri.conf.json - Ask if you want to commit and push
Then GitHub Actions will:
- Build the app for all platforms
- Create a draft release
- Generate
latest.jsonfor auto-updates - Upload all installers and signatures
Finally, manually publish the draft release on GitHub.
# Update versions in package.json, Cargo.toml, tauri.conf.json
npm run check:all
git add .
git commit -m "chore: release v1.0.0"
git tag v1.0.0
git push origin main --tagsSemantic versioning (v1.0.0):
- Major (1.x.x): Breaking changes
- Minor (x.1.x): New features, backwards compatible
- Patch (x.x.1): Bug fixes
All three files must have matching versions:
package.json→"version": "1.0.0"src-tauri/Cargo.toml→version = "1.0.0"src-tauri/tauri.conf.json→"version": "1.0.0"
- Checks for updates 5 seconds after app launch
- Shows confirmation dialog when update is available
- Downloads and installs in background
- Offers to restart when complete
- Fails silently on network issues
App Launch → (5s delay) → Check GitHub → Show Dialog → Download → Install → Restart
// src/App.tsx
import { check } from '@tauri-apps/plugin-updater'
import { relaunch } from '@tauri-apps/plugin-process'
useEffect(() => {
const checkForUpdates = async () => {
try {
const update = await check()
if (update) {
const shouldUpdate = confirm(`Update available: ${update.version}...`)
if (shouldUpdate) {
await update.downloadAndInstall()
if (confirm('Restart to apply update?')) {
await relaunch()
}
}
}
} catch {
// Silent fail - don't bother user with network issues
}
}
const timer = setTimeout(checkForUpdates, 5000)
return () => clearTimeout(timer)
}, [])Users can manually check via:
- Menu: App → Check for Updates
- Command Palette: Cmd+K → "Check for Updates"
Each release creates:
- macOS:
.dmginstaller - Windows:
.msiinstaller (when configured) - Linux:
.deband.AppImage(when configured) - Auto-updater:
latest.jsonmanifest and.sigsignature files
All updates are cryptographically signed:
- Private key signs releases during build
- Public key in config verifies downloads
- Invalid signatures are automatically rejected
| Issue | Solution |
|---|---|
| Workflow doesn't trigger | Ensure tag starts with v and is pushed |
| Build fails | Check GitHub secrets, run npm run check:all locally |
| Updates not detected | Verify endpoint URL and public key match |
| Download fails | Check signatures, file permissions, disk space |