feat: pre-release update channel + automated pre-releases from main - #159
Merged
Conversation
Every merge to main now publishes a signed pre-release (X.Y.Z-pre.<run_number>), and users can switch the update channel to Pre-release in Settings → Software Updates. Channel selection rides an X-Mcpmux-Channel header resolved by api.mcpmux.com/v1/update/latest.json, keeping the proven JS check/install flow untouched; the GitHub stable URL stays as a fallback endpoint. - settings: get_update_channel / set_update_channel commands (+ unit tests) - ui: Stable / Pre-release selector; both check() sites send the channel header - ci: gated prerelease jobs (pre-create draft -> build by id -> publish), reusable build-tauri.yml, promote.yml escape hatch, scripts/set-version.mjs - release-please remains the stable changelog/version source (manifest mode, so the v*-pre.* tags don't interfere) The Cloudflare Worker resolver ships separately in mcpmux.serverhub.api. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
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.
What & why
Adds a Pre-release update channel so every change merged to
mainis automatically shipped as a signed pre-release, and users can opt into early builds from Settings → Software Updates. The normal stable flow (release-please) is unchanged. Seeradiant-enchanting-sundaeplan.How it works
check()can't set endpoints, so the app sendsX-Mcpmux-Channel: stable|prereleaseand a resolver atapi.mcpmux.com/v1/update/latest.jsonreturns the matching release'slatest.json. This keeps the proven JS check/install path 100% intact (a broken updater can't fix itself) and yields per-channel update analytics. The GitHub/releases/latestURL stays as a fallback endpoint, so stable updates keep working even if the resolver is down or not yet deployed.X.Y.Z-pre.<run_number>, whereX.Y.Zis release-please's pending next version (read from its bot-branch manifest). SemVer ordering holds:0.3.0 < 0.4.0-pre.318 < 0.4.0.promote.ymlrebuilds a chosen-pre.Ncommit as signed stable.v*-pre.*tags don't interfere).Changes
App
commands/settings.rs:get_update_channel/set_update_channel(keyupdates.channel, defaultstable) + unit tests; registered inlib.rs.lib/updates.ts: channel helper that sends the header; wired into bothcheck()sites (App.tsxlaunch auto-check,UpdateChecker.tsxmanual).UpdateChecker.tsx: Stable / Pre-release selector.tauri.conf.json: resolver endpoint + GitHub stable fallback.CI
release.yml: gatedprereleasejobs (pre-create draft → build by id → publish) — race-free, like the stable flow.build-tauri.yml: reusable build shared by stable / pre-release / promote.promote.yml:workflow_dispatchpromote-by-tag.scripts/set-version.mjs: stamps the version onto the 3 release-please-tracked files.Tests / validation
cargo clippy --workspace -- -D warnings,cargo fmt --checkcommands::settings, incl. newnormalize_channel)pnpm typecheck, ESLint (0 errors), full TS suite (197 + 7 new)Companion PR (separate repo)
The resolver route (
GET /v1/update/latest.json) ships in mcpmux.serverhub.api. After merging it: deploy the worker andwrangler secret put GITHUB_TOKEN(recommended for API rate limits). Until then, the fallback endpoint serves stable.