Menu

#328 ci(release): DMG auto-update staging channel on pre-main

closed
nobody
None
2026-06-24
2026-06-24
Anonymous
No

Originally created by: Akarsh-Hegde

What

Stands up a pre-production staging release channel on pre-main that exercises the full release pipeline + the packaged app + live auto-update before pre-main → main, with zero impact on production.

Reuses the proven staging skeleton (GitHub-only, prerelease-versioned) and grafts on the DMG auto-update piece the legacy staging-branch config predated (it had no signing key, no DMG, no latest.json).

Files (4 new)

File Role
tray/src-tauri/tauri.staging.conf.json Build-time --config overlay pointing the updater at the staging endpoint (…/releases/download/updater-staging/latest.json). Never committed into tauri.conf.json → cannot leak to main.
.releaserc.staging.json Staging semantic-release config: branches adds {pre-main, prerelease: staging}; set-version runs first (fixes the version-baking footgun); tray build takes the overlay; GitHub-only (dropped npm/git/changelog → no version-bump commits pollute pre-main); publishCmd mirrors latest.json.
scripts/mirror-staging-release.sh Clobbers latest.json (+ stable DMG) onto a fixed updater-staging prerelease so installed staging apps self-update. Mirrors the repo's existing runtime-staging fixed-tag convention.
.github/workflows/release-staging.yml Builds pre-main only on a [staging-release] marker commit or a manual dispatch — never on ordinary integration pushes. Adds TAURI_SIGNING_*; cps the staging config in-CI (ephemeral).

Isolation guarantee

Production (main: release.yml + .releaserc.json) is untouched, and this workflow is not added to main. The staging endpoint is baked only at build time via --config; the committed tauri.conf.json keeps the production endpoint, so even after pre-main → main merges, main builds bake production.

Why marker-commit + dispatch (not plain workflow_dispatch)

Two GitHub constraints: a dispatch-by-name needs the workflow registered (normally requires it on the default branch), and semantic-release reads the channel from GITHUB_REF — so the run must carry ref=pre-main or it would treat the build as main and cut a stable release from pre-main code. Triggering from pre-main (gated by a marker so the busy integration branch doesn't build on every push) satisfies both and keeps the workflow off main.

How to test (after merge)

  1. Cut the first staging build:
    git checkout pre-main && git pull git commit --allow-empty -m "chore(release): first staging cut [staging-release]" git push
    → expect a v1.64.0-staging.1 prerelease with DMG + tarball + sig + latest.json, and an updater-staging rolling release.
  2. Install the staging DMG → app reports 1.64.0-staging.1, endpoint = updater-staging.
  3. Push another [staging-release] commit → v1.64.0-staging.2; the installed app self-updates staging→staging. (After the first run, gh workflow run release-staging.yml --ref pre-main also works.)

⚠️ One first-run checkpoint: confirm Tauri resolves --config src-tauri/tauri.staging.conf.json relative to the tray dir; if not, the build errors clearly and the path is a one-line fix.

🤖 Generated with Claude Code

Related

Tickets: #347

Discussion

  • Anonymous

    Anonymous - 2026-06-24

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.


    ⚙️ Run configuration

    Configuration used: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 7cedbda1-9d8d-416b-885d-a471755843d3

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    Use the checkbox below for a quick retry:
    - [ ] 🔍 Trigger review

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feat/updater-staging-channel`

    Comment @coderabbitai help to get the list of available commands.

     
  • Anonymous

    Anonymous - 2026-06-24

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     

Log in to post a comment.