Release the Web and Desktop Apps
Symptoms
A commit on qubital-apps' main has run on staging, and the team agreed to ship it to the prod web app and the desktop apps.
Impact
- Prod web app (
https://app.qubital.space): Northflank starts the new version and switches to it once it is ready. Open tabs get it at their next page load. - Desktop apps: an app started after the publish finds the update at start: a new major or minor version shows a notice and installs as soon as it has downloaded; a patch asks "Install on next launch" or "Install now". An app already running finds it within 4 hours, downloads it without a word and installs it when it quits. Tell the team before a major or minor.
- The candidate's desktop apps talk to prod. Whoever tests them signs in to the prod backend, with prod data.
How it all works is in Web and Desktop Release.
Steps
-
Backend first, when the web needs a new API.
- Release the backend: Release the Backend to Prod.
- In a
qubital-appspull request, pin@startingquotechdivision/api-contractto that version in thecatalogofpnpm-workspace.yaml, runpnpm install, and commit the bump on its own. - Merge it, and wait for "ci: web app to staging" to deploy it.
Even without a new API, the pin must be a prod contract: a plain
X.Y.Zof the major prod runs, and not above it. A staging pin,0.0.0-staging.<commit>, is refused. Check both:# The app's pin, on maingit fetch origin && git show origin/main:pnpm-workspace.yaml | grep api-contract# What prod's backend runs: its latest release. It prints v6.2.0; the pin has no v: 6.2.0gh release view -R StartingQuoTechDivision/qubital-backend --json tagName --jq .tagName -
Check that staging is green. Actions → "ci: web app to staging": the newest run on
mainis green, and the team has checked the change onhttps://app.qubital-test.com. -
Pick the version. It must be above every release tag, every GitHub release (drafts included) and both feeds:
curl -fsS "https://releases.qubital.space/latest.yml?check=$(date +%s)" | grep '^version:'curl -fsS "https://releases.qubital.space/latest-mac.yml?check=$(date +%s)" | grep '^version:'gh release list -R StartingQuoTechDivision/qubital-apps --limit 5A patch (
6.0.3) for fixes, a minor (6.1.0) for new features, a major when the team decides on one. Write it without av. -
Candidate dry run. Actions → "release: web and desktop" → Run workflow. GitHub shows each field by its description, not its name, and the fields always come in this order. The tables give each field's name, then the opening words of its label:
Field Value Use workflow from mainstage ("candidate: build and upload a release…") candidateversion ("candidate: the version, X.Y.Z…") the version, such as 6.0.3commit ("candidate only: the full 40-character SHA…") empty dry_run ("candidate: run every check…") checked release_summary ("candidate only: optional…") empty The run is named
release: candidate 6.0.3 (dry run). It checks everything and builds nothing. In the run's summary, every check writes a line; the first Commit line names the commit staging runs now. Copy its full SHA. -
Candidate. Run the workflow again:
Field Value Use workflow from mainstage ("candidate: build and upload a release…") candidateversion ("candidate: the version, X.Y.Z…") the same version commit ("candidate only: the full 40-character SHA…") the full SHA from the dry run's first Commit line dry_run ("candidate: run every check…") unchecked release_summary ("candidate only: optional…") one to three sentences on what changed for users Giving the commit keeps this run, and any re-run of it, on the commit the dry run checked, even if staging deploys a newer one meanwhile. The Mac job takes longest: it waits on Apple's notarization. When the run is green, Releases holds a draft
v6.0.3with download links for testing. -
Test from the draft's links.
- Web: the candidate's web image is the one staging ran for this commit. Test it on
https://app.qubital-test.comwhile its/version.jsonnames the commit. - Windows: install the
.exeon a machine without Qubital (SmartScreen warns: "More info" → "Run anyway"), and once over the version installed now. - Mac: install the
.dmgon an Apple silicon Mac and on an Intel Mac. Gatekeeper lets it open with no security warning. - In the desktop app (it talks to prod): sign in, join an office call with camera, microphone and screen share, and open a
space.qubital.app://link. - The notes: edit the draft's text if needed, but keep its first line and the heading "Downloads for testing": publish swaps them for "Live." and "Downloads". A draft whose first line was changed is published exactly as written.
- Web: the candidate's web image is the one staging ran for this commit. Test it on
-
Publish dry run:
Field Value Use workflow from mainstage ("candidate: build and upload a release…") publishversion ("candidate: the version, X.Y.Z…") the candidate's version commit ("candidate only: the full 40-character SHA…") empty dry_run ("candidate: run every check…") checked release_summary ("candidate only: optional…") empty Every label opens with its candidate part; its publish part follows, starting with "publish". Publish refuses a
commitor arelease_summary: it takes the candidate's commit, and its notes from the draft. -
Publish. The same fields, with
dry_rununchecked. It deploys the web app, then puts the desktop update live, then tags the commit and publishes the release. The summary's Deploy line names thequbital-infracommit that deployed the web app: keep it for a rollback. -
If a step fails, read the failed step's error, fix the cause, then use Re-run all jobs. Never "Re-run failed jobs": every job refuses an attempt whose checks ran in an earlier one. For a wrong input, such as a mistyped version, start a new run instead: a re-run repeats the inputs.
Job that failed What it leaves What to do Check the candidate Nothing, or only the draft Fix the cause, then re-run Copy the web image into the prod package, Build the Mac app, Build the Windows app The draft and maybe the prod image tag; nothing on the feed Re-run: it reuses both Upload the candidate Maybe some files of the version on the feed Re-run. If the checks refuse with "The feed bucket already holds files of", the version is used up: delete the draft and build the next version Fill the draft release A complete candidate with the draft's first text Don't re-run (it is refused). Write the draft's text by hand from the run's summary Check the publish Nothing changed by this attempt Fix the cause, then re-run, or build a new candidate when the error says so Deploy the web app to prod Before its deploy step, nothing. After it, prod's web app runs the new version, and the desktop update and the release are not live Re-run to finish, or roll the web app back with a revert of the deploy commit the error names (Roll Back a Deploy) Put the desktop update live The web app live; maybe latest/andlatest.ymltooRe-run: each step writes the same again Tag and publish the release Everything live but the tag or the release Re-run. If GitHub refused the tag, first create it by hand as the error says, then re-run What a re-run can't finish. A check can turn false after the web deploy, for example a change to
production/webapp.json's shared values, a new major of the backend's contract, or a merged change to.github/workflows. Then every re-run is refused at "Check the publish", while prod's web app runs the new version. Unless the error names a fix, such as the tag made by hand, roll the web app back, or build a new candidate whose publish replaces it.verify says
supersededat "Deploy the web app to prod" when another commit toproduction/webapp.jsonwent live first. Every re-run fails the same way. To finish: revert the deploy commit inqubital-infra, wait for the revert's verify, then "Re-run all jobs", which deploys again with a commit of its own.The tag by hand, when the error asks for it: the error names the tag and the full commit SHA, and at the tag step it prints the whole command. In a clone of
qubital-apps, as someone allowed to change workflows (the workflow's own token isn't), replace the version and the commit:git fetch origingit tag -a v6.0.3 0123456789abcdef0123456789abcdef01234567 -m "Release 6.0.3"git push origin v6.0.3Then "Re-run all jobs", or run publish again: it finds the tag and goes on.
Verification
-
Both runs are green, and Releases shows
v6.0.3as Latest. -
Prod serves the commit, and the feeds serve the version:
curl -fsS https://app.qubital.space/version.jsoncurl -fsS "https://releases.qubital.space/latest.yml?check=$(date +%s)" | grep '^version:'curl -fsS "https://releases.qubital.space/latest-mac.yml?check=$(date +%s)" | grep '^version:' -
Restart a desktop app: it finds the update.
An abandoned candidate
When a candidate fails its tests, or the team drops it:
- Delete its draft: Releases → the draft
v<version>→ the trash icon → Delete this release. Publish then refuses every publish of that version. - Take a higher version for the next candidate. Its versioned files stay on the feed and its image tag stays in
qubital-webapp-prod; nothing points at them. - If its publish had already deployed the web app, prod's web app still runs it: roll it back (Roll Back a Deploy), or publish a newer version, which replaces it.
A waiting candidate also blocks every lower one: publish takes only the highest candidate. So a candidate built above a waiting draft makes that draft unpublishable; delete it.
Escalation
The team owner (Northflank, qubital-infra and repository owner).