Skip to content

feat(updater): beta update channel + prerelease release pipeline#398

Merged
Chloe-JY merged 1 commit into
developfrom
feat/beta-update-channel
Jul 16, 2026
Merged

feat(updater): beta update channel + prerelease release pipeline#398
Chloe-JY merged 1 commit into
developfrom
feat/beta-update-channel

Conversation

@Harry19081

@Harry19081 Harry19081 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds a stable/beta update-channel system: users can opt into prerelease builds from Settings, and the release pipeline can ship betas that auto-update along their own channel.

Release pipeline (release.yaml)

  • Beta releases: tag vX.Y.Z-beta.N (for the next unreleased X.Y.Z) — same workflow, marked as GitHub prerelease as before.
  • Beta channel manifest: every release (stable and beta) now publishes beta.json to a rolling updater release (auto-created on first run, semver-guarded against out-of-order rebuilds). The beta channel therefore always points at the newest build of either kind, so beta users converge back onto stable once it overtakes the last beta. The stable channel keeps using the untouched releases/latest/download/latest.json alias — zero change for existing installs.
  • Windows on prerelease tags: builds NSIS only (WiX/MSI rejects SemVer prerelease versions). The updater already uses the NSIS artifact; the MSI remains on stable releases.

Backend

  • New check_app_update(channel) command: rebuilds the updater against the selected channel's manifest endpoint and registers the result in the webview resource table — the plugin's own Update class (download/install/close) keeps working unchanged. The channel→URL map lives in Rust so page code can never point the updater at arbitrary URLs, preserving the updater plugin's security posture.

Frontend

  • general.updateChannel setting: auto | stable | beta, default auto — prerelease builds track beta, release builds track stable, so a manually installed beta DMG keeps updating along the beta channel without touching any toggle.
  • Settings → General: update-channel select (Stable/Beta) next to auto-update, showing the resolved channel; picking an option pins it and re-checks immediately so a stale update from the previous channel doesn't linger.
  • Switching beta → stable never downgrades; it takes effect at the next stable release (SemVer: 1.1.25-beta.N < 1.1.25).
  • i18n: en / zh / zh-Hant (other locales fall back to en per existing convention).

Test plan

  • cargo check + cargo clippy clean (no findings in new code)
  • eslint + prettier clean on all touched files
  • 32/32 vitest passing, including new suites: channel resolver, settings-schema default/validation, channel-aware check (stable/beta resolution, pinned channel, null-update, metadata wrapping, version-read failure)
  • Workflow YAML validated; no circular deps
  • End-to-end: push a v1.1.25-beta.1 tag and verify the updater rolling release gets beta.json, a beta install self-updates to beta.2, and a stable install stays untouched

Closes #399

- Release workflow publishes beta.json to a rolling 'updater' release on
  every release (semver-guarded) so the beta channel always tracks the
  newest build of either kind; prerelease tags skip the MSI bundle (WiX
  rejects SemVer prerelease versions) and ship NSIS only
- New check_app_update Tauri command rebuilds the updater against the
  selected channel's manifest endpoint and registers the update in the
  webview resource table, so the plugin's Update download/install flow
  works unchanged; channel-to-URL mapping stays in Rust
- general.updateChannel setting (auto|stable|beta, default auto: prerelease
  builds track beta, release builds track stable) with a stable/beta
  select in General settings; switching re-checks immediately and never
  downgrades

Pre-commit hook ran. Total eslint: 0, total circular: 0
@Chloe-JY
Chloe-JY merged commit ee153c3 into develop Jul 16, 2026
1 of 2 checks passed
@Chloe-JY

Copy link
Copy Markdown
Collaborator

Reviewed with fable - LGTM

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.

Beta update channel: opt-in prerelease builds with a stable/beta toggle

2 participants