Automated Releases & Updates
Relevant source files
The following files were used as context for generating this wiki page:
The Automated Releases & Updates system manages the lifecycle of application versions, from CI/CD distribution to client-side installation. It ensures users receive the latest features and security patches through a multi-channel update mechanism integrated into the Tauri desktop runtime.
This system coordinates between GitHub Actions for artifact generation, a signed manifest for verification, and a React-based frontend store that manages update states and user notifications. The architecture supports standard Tauri updates, Arch Linux (AUR) checks, and manual download fallbacks for non-stable channels.
Sources: README.md:82-82, CONTRIBUTING.md:144-154, src/renderer/lib/tauri-updater-api.ts:36-40
Release Infrastructure and CI/CD
Termul automates releases via GitHub Actions triggered by version tags. The build pipeline generates signed artifacts for Windows, macOS, and Linux.
Artifact Signing
Update verification uses a minisign keypair. The public key is hardcoded in the application configuration to verify the integrity of downloaded binaries.
- Public Key Storage:
src-tauri/tauri.conf.json - Private Key Storage: GitHub Secret
TAURI_SIGNING_PRIVATE_KEY - Key Rotation: Requires a release signed with the old key to ship the new public key before rotating the private key.
Sources: CONTRIBUTING.md:156-163, src-tauri/tauri.conf.json:37-43
Build Targets
The project supports cross-platform builds managed through Bun and Tauri CLI.
| Target Platform | Command | Architecture |
|---|---|---|
| Windows | bun run build:tauri:win | x64 |
| macOS (Intel) | bun run build:tauri:mac-x64 | x86_64 |
| macOS (Silicon) | bun run build:tauri:mac-arm | aarch64 |
| Linux | bun run build:tauri:linux | x64 |
Sources: CONTRIBUTING.md:135-138, package.json:71-74
Client-Side Update Logic
The update process is divided into three distinct modes: Tauri (Standard), AUR (Arch Linux), and Manual.
Update Modes
- Tauri Mode: Uses the
@tauri-apps/plugin-updaterto check, download, and install signed bundles. - AUR Mode: Performs a version check against GitHub Releases; users must update manually via
yay -S termul-manager. - Manual Mode: Used for Insider and Nightly channels where the standard plugin cannot resolve dynamic endpoints.
Sources: src/renderer/lib/tauri-updater-api.ts:58-69, CHANGELOG.md:106-106
Update Lifecycle Flow
The following diagram illustrates the sequence from checking for updates to application relaunch.
The diagram shows the coordination between the React store, the TypeScript API facade, and the underlying Rust plugin.
Sources: src/renderer/lib/tauri-updater-api.ts:254-325, src/renderer/stores/updater-store.ts:90-120
Release Channels
Termul supports three release channels to balance stability and new features.
| Channel | Manifest URL | Purpose |
|---|---|---|
| Stable | latest-stable.json | Production-ready releases |
| Insider | latest-insider.json | Early access to new features |
| Nightly | latest-nightly.json | Bleeding-edge automated builds |
Sources: src/renderer/lib/tauri-updater-api.ts:24-34
Channel Switching Logic
When you switch a channel, the system:
- Persists the new preference via
tauriSetUpdateChannel. - Calls
clearPendingUpdate()to reset module-level state, preventing a stale stable version from being installed on a nightly channel. - Triggers a re-check if auto-updates are enabled.
Sources: src/renderer/stores/updater-store.ts:211-235
Recovery and Backup System
To prevent data loss during the update process, Termul implements a recovery metadata sync and backup mechanism before applying updates.
Pre-Update Steps
Before the downloadUpdate process begins, the system executes the following:
- Metadata Sync: Synchronizes the current version string between the app and the recovery system.
- Filesystem Backup: Creates a full backup of application data.
- Rollback Preparation: Sets the "previous version" pointer to allow for recovery if the new version fails to boot.
Sources: src/renderer/lib/tauri-updater-api.ts:107-139, src/renderer/lib/tests/tauri-updater-api.test.ts:139-141
Failure Handling
If the backup fails (e.g., DISK_SPACE_ERROR), the updater returns DISK_SPACE_INSUFFICIENT and aborts the download to protect the existing installation.
Sources: src/renderer/lib/tauri-updater-api.ts:123-128, src/renderer/lib/tests/tauri-updater-api.test.ts:175-190
Version Comparison Logic
The system uses SemVer 2.0 precedence for version comparison. This ensures that 0.0.0-nightly.* is treated as "lesser" than any stable release, allowing users to transition from pre-release channels to stable releases seamlessly.
Comparison Rules
- Core Version: Compares Major, Minor, and Patch numerically.
- Prerelease: A release version always takes precedence over a prerelease (e.g.,
0.5.0>0.5.0-rc.1). - Identifiers: Numeric identifiers are compared numerically; alphanumeric identifiers are compared lexically.
Sources: src/renderer/lib/tauri-updater-api.ts:183-228
Configuration Options
Update behavior is configurable via the UpdaterStore.
| Option | Type | Description |
|---|---|---|
autoUpdateEnabled | boolean | Toggles periodic background checks. |
updateChannel | string | Selects between stable, insider, and nightly. |
skippedVersion | string | Stores a version string the user has chosen to ignore. |
Sources: src/renderer/stores/updater-store.ts:50-65
Summary
The Automated Releases & Updates system provides a robust framework for application maintenance. It combines CI/CD automation with client-side safety measures like filesystem backups and SemVer-aware versioning. By supporting multiple channels and update modes (Tauri, AUR, Manual), it accommodates various distribution methods while maintaining installation integrity through cryptographic signing.