Open History to see the last commit
1# Release Checklist
2
3> For maintainers. Using T3 Code? See [docs/user](../user/).
4
5This document covers the unified release workflow for stable and nightly desktop releases.
6
7## What the workflow does
8
9- Workflow: `.github/workflows/release.yml`
10- Triggers:
11 - push tag matching `v*.*.*` for stable releases
12 - scheduled nightly check every three hours
13 - manual `workflow_dispatch` for either channel
14- Runs quality gates first: lint, typecheck, test.
15- Reads the shared production T3 Connect relay URL and Clerk client configuration before packaging clients.
16- Builds four artifacts in parallel for both channels:
17 - macOS `arm64` DMG
18 - macOS `x64` DMG
19 - Linux `x64` AppImage
20 - Windows `x64` NSIS installer
21- Publishes one GitHub Release with all produced files.
22 - Stable tags with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
23 - Only plain stable `X.Y.Z` releases are marked as the repository's latest release.
24 - Nightly runs are always GitHub prereleases and never marked latest.
25 - Automatically generated release notes are pinned to the previous tag in the same channel, so stable compares to the previous stable tag and nightly compares to the previous nightly tag.
26- Includes Electron auto-update metadata (for example `latest*.yml`, `nightly*.yml`, and `*.blockmap`) in release assets.
27- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing from the same workflow file:
28 - stable releases publish npm dist-tag `latest`
29 - nightly releases publish npm dist-tag `nightly`
30- Deploys the hosted web app to Vercel only after a release is published:
31 - stable releases are aliased to the `latest` hosted app channel
32 - nightly releases are aliased to the `nightly` hosted app channel
33- Signing is optional and auto-detected per platform from secrets.
34
35## Required release credentials
36
37Stable releases require these GitHub Actions secrets in addition to the platform and deployment
38credentials documented below:
39
40- `RELEASE_APP_ID`
41- `RELEASE_APP_PRIVATE_KEY`
42
43The finalize job uses them to commit and push aligned package versions to `main` as the Release App.
44GitHub Release publication uses the repository-scoped workflow token so it has a rate-limit quota
45independent from the shared Release App installation.
46
47## T3 Connect relay deployment
48
49The relay is a shared control plane versioned separately from client releases. Stable and nightly
50client builds must point at the same relay so users see the same linked environments when switching
51release channels.
52
53`.github/workflows/deploy-relay.yml` deploys Alchemy stage `prod` on every push to `main`. The
54release workflow reads the relay URL and Clerk client configuration from the existing `production`
55GitHub Actions environment before building desktop, CLI, or hosted web artifacts.
56
57Required repository variables shared by relay deployments:
58
59- `CLOUDFLARE_ACCOUNT_ID`
60- `PLANETSCALE_ORGANIZATION`
61- `AXIOM_ORG_ID`
62
63Required repository secrets shared by relay deployments:
64
65- `CLOUDFLARE_API_TOKEN`
66- `PLANETSCALE_API_TOKEN_ID`
67- `PLANETSCALE_API_TOKEN`
68- `AXIOM_TOKEN`
69
70Required `production` environment variables:
71
72- `RELAY_API_ZONE_NAME`
73- `RELAY_TUNNEL_ZONE_NAME`
74- `CLERK_PUBLISHABLE_KEY`
75- `CLERK_JWT_AUDIENCE`
76- `CLERK_JWT_TEMPLATE`
77- `CLERK_CLI_OAUTH_CLIENT_ID`
78- `APNS_ENVIRONMENT`
79- `APNS_TEAM_ID`
80- `APNS_KEY_ID`
81- `APNS_BUNDLE_ID`
82
83Optional `production` environment variables:
84
85- `RELAY_DOMAIN` when overriding the derived `relay.<RELAY_API_ZONE_NAME>` domain
86
87Required `production` environment secrets:
88
89- `CLERK_SECRET_KEY`
90- `APNS_PRIVATE_KEY`
91
92The account-scoped repository credentials are consumed by Alchemy while provisioning relay stages; they
93are not bound into the relay Worker. The production deployment uses an Axiom personal access token,
94so `AXIOM_ORG_ID` must accompany `AXIOM_TOKEN`. The `prod` stage owns the retained PlanetScale
95database. Local personal stages provision isolated branches from it and are never deployed by CI.
96Production adopts the configured relay API and tunnel DNS zones as retained Cloudflare resources.
97Personal stages reference the production-owned zones.
98
99Developers deploy personal stages locally rather than through pull-request automation:
100
101```sh
102vp run --filter t3code-relay deploy -- --stage "$USER" --env-file .env.local
103```
104
105## Hosted web app release deployment
106
107The hosted app is intentionally not deployed by Vercel's Git integration. The
108web project disables automatic Git deployments in `apps/web/vercel.ts` via
109`git.deploymentEnabled: false`, and `.github/workflows/release.yml` deploys the
110web app with Vercel CLI after the GitHub Release succeeds.
111
112Required GitHub Actions secrets:
113
114- `VERCEL_TOKEN`
115- `VERCEL_ORG_ID`
116- `VERCEL_PROJECT_ID`
117
118Optional GitHub Actions variables:
119
120- `VERCEL_TEAM_SLUG`: overrides the Vercel CLI scope when the team slug is preferred over the `VERCEL_ORG_ID` secret.
121- `T3CODE_WEB_ROUTER_URL`: defaults to `https://app.t3.codes`.
122- `T3CODE_WEB_LATEST_DOMAIN`: defaults to `latest.app.t3.codes`.
123- `T3CODE_WEB_NIGHTLY_DOMAIN`: defaults to `nightly.app.t3.codes`.
124
125Required Vercel domains:
126
127- `app.t3.codes`: the router domain users open, updated by stable releases.
128- `latest.app.t3.codes`: channel alias updated by stable releases.
129- `nightly.app.t3.codes`: channel alias updated by nightly releases.
130
131The router domain uses `apps/web/vercel.ts` routes. Users opt into a channel by
132visiting `/__t3code/channel?channel=latest` or
133`/__t3code/channel?channel=nightly`; the router stores the
134`t3code_web_channel` cookie and rewrites future requests on `app.t3.codes` to
135the matching channel alias.
136
137The release deploy job rewrites release package versions before upload so the
138hosted app's About panel renders the release version. Stable deploys alias the
139same deployment to both the `latest` channel and the router domain so the router
140rules stay current. Nightly deploys only alias the `nightly` channel. The job
141also passes `VITE_HOSTED_APP_CHANNEL=latest|nightly`, which renders the hosted
142update track selector in the About panel. Changing the selector navigates
143through `/__t3code/channel` on the router domain so the user's channel cookie is
144updated before redirecting to the hosted app root.
145
146One-time Vercel dashboard setup:
147
1481. Confirm the web project root directory remains `apps/web`.
1492. Add the three domains above to the web project.
1503. Disable automatic Git deployments in the dashboard if desired; the committed
151 `vercel.ts` setting is the source-of-truth, but disconnecting Git in the
152 dashboard is also safe.
1534. Run one stable release deployment, or manually alias the current stable
154 deployment, so `app.t3.codes` points at a deployment containing the router
155 rules in `apps/web/vercel.ts`. Future stable releases keep this alias current.
156
157## Nightly builds
158
159- Workflow: `.github/workflows/release.yml`
160- Triggers:
161 - scheduled check every three hours
162 - manual `workflow_dispatch` with `channel=nightly`
163- Runs the same desktop quality gates and artifact matrix as the tagged release flow.
164- Publishes a GitHub prerelease only:
165 - current tag format: `vX.Y.Z-nightly.YYYYMMDD.<run_number>`
166 - `nightly-v...` is accepted only as a legacy previous-nightly tag
167 - release name includes the short commit SHA
168 - `make_latest` is always `false`
169- Uses the next stable patch version as the nightly base. For example, `0.0.17` produces nightlies on `0.0.18-nightly.*`.
170- Publishes Electron auto-update metadata to the dedicated `nightly` updater channel, so desktop users can opt into that track independently from stable.
171- Publishes the CLI package (`apps/server`, npm package `t3`) to the `nightly` npm dist-tag using the same nightly version.
172- Does not commit version bumps back to `main`.
173
174## Server self-update release invariant
175
176Connected servers update to the client's exact version, not to an npm dist-tag. Every released
177desktop or hosted client version must therefore have a matching `t3@<version>` package available on
178npm before users can receive that client.
179
180The workflow enforces this ordering:
181
1821. `publish_cli` publishes the exact stable or nightly version to npm.
1832. `release` depends on `publish_cli` before exposing desktop artifacts in GitHub Releases.
1843. `deploy_web` depends on `release` before moving the hosted channel to the new client.
185
186Preserve these dependencies when changing the release graph. Publishing a client first would leave
187the **Update server** action targeting a package version that does not exist yet.
188
189For a release smoke test, confirm `npm view t3@<version> version` returns the expected version, then
190connect the new client to a server on the previous version and verify that the update action
191reconnects to the matching server. Use releases with identical migration manifests for the
192automatic path. When the manifest changed, verify that the remote action stops before restart and
193shows the exact local `npx t3@<version> service update` command. Also test the manual or
194desktop-managed guidance when those environments are available.
195
196## Desktop auto-update notes
197
198- Updater runtime: `apps/desktop/src/updates/DesktopUpdates.ts`.
199- `electron-updater` adapter: `apps/desktop/src/electron/ElectronUpdater.ts`.
200- `apps/desktop/src/main.ts` only wires the updater layers into the desktop runtime.
201- Update UX:
202 - Background checks run on startup delay + interval.
203 - No automatic download or install.
204 - The desktop UI shows a rocket update button when an update is available; click once to download, click again after download to restart/install.
205- Provider: GitHub Releases (`provider: github`) configured at build time.
206- Repository slug source:
207 - `T3CODE_DESKTOP_UPDATE_REPOSITORY` (format `owner/repo`), if set.
208 - otherwise `GITHUB_REPOSITORY` from GitHub Actions.
209- Required release assets for updater:
210 - platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
211 - channel metadata: `latest*.yml` for stable releases, `nightly*.yml` for nightly releases
212 - `*.blockmap` files (used for differential downloads)
213- macOS metadata note:
214 - `electron-updater` reads `latest-mac.yml` on stable and `nightly-mac.yml` on nightly, for both Intel and Apple Silicon.
215 - The workflow merges the per-arch mac manifests into one channel-specific mac manifest before publishing the GitHub Release.
216
217### Windows payload topology and update validation
218
219Windows packages the bundled server and only its runtime-external/native
220dependency closure in `resources/server.asar`. Native modules and helper
221executables declared as unpacked by that archive must be present at the matching
222paths below `resources/server.asar.unpacked`. The Windows-native backend reads
223the archive in place through Electron. WSL cannot read ASAR files, so enabling
224the WSL backend extracts the server tree once into the desktop state directory
225under `wsl-server-tree/<version>` and reuses the completed version until the app
226is updated.
227
228The artifact builder rejects a Windows package when any of these invariants
229break:
230
231- `resources/server.asar` is absent or does not contain the server entry.
232- Any file marked unpacked in the ASAR header is absent from
233 `resources/server.asar.unpacked`.
234- On same-architecture Windows builds, the packaged primary cannot load the fff
235 native library from inside `server.asar` through its `.unpacked` sibling.
236- The isolated, extracted sidecar cannot load the server entry with plain Node.
237- The external Windows resource monitor is absent.
238- The unpacked Windows application contains more than 80 files.
239
240Cross-architecture Windows builds retain every structural and extracted-sidecar
241check, but skip executing the target Electron binary. A same-architecture build
242for each release target must exercise the primary native-load probe.
243
244NSIS differential packaging remains enabled. A sidecar layout transition can
245produce a larger one-time download; subsequent small releases retain their
246blockmaps, with a 60 MB maximum for a representative sidecar-to-sidecar update.
247
248## 0) npm OIDC trusted publishing setup (CLI)
249
250The workflow invokes `node apps/server/scripts/cli.ts publish` after aligning package versions. That
251script temporarily prepares the `t3` package, then runs `vp pm publish --filter t3 ...` from the
252repository root so workspace publish configuration is applied correctly.
253
254Checklist:
255
2561. Confirm npm org/user owns package `t3` (or rename package first if needed).
2572. In npm package settings, configure Trusted Publisher:
258 - Provider: GitHub Actions
259 - Repository: this repo
260 - Workflow file: `.github/workflows/release.yml`
261 - Environment (if used): match your npm trusted publishing config
2623. Ensure npm account and org policies allow trusted publishing for the package.
2634. Create release tag `vX.Y.Z` and push; workflow will:
264 - align the release package versions to `X.Y.Z`
265 - build web + server
266 - invoke the CLI publish script with npm dist-tag `latest`
2675. Nightly runs invoke the same publish script with npm dist-tag `nightly`.
268
269## 1) Release validation and unsigned builds
270
271There is no dry-run tag path. Pushing any accepted non-nightly tag, including
272`v0.0.0-test.1`, classifies the run as the stable channel. It publishes `t3` with npm dist-tag
273`latest`, creates a real GitHub Release, aliases the hosted app to `latest.app.t3.codes` and
274`app.t3.codes`, and can commit a version bump to `main` in the finalize job. Do not push a test tag
275to validate the workflow.
276
277The workflow has no non-publishing `workflow_dispatch` mode. Use normal CI or local quality gates to
278validate checks and builds without shipping. To exercise the complete release graph at lower stable
279risk, manually dispatch `channel=nightly`; this still publishes a real nightly npm package, GitHub
280prerelease, desktop updater release, and hosted nightly alias, but it does not update stable aliases or
281commit a version bump to `main`. Only run it when a real nightly release is acceptable.
282
283Manual `channel=stable` with a version input is also a real stable-channel release. Omitting signing
284secrets only makes platform artifacts unsigned; it does not prevent publication.
285
286## 2) Apple signing + notarization setup (macOS)
287
288Required secrets used by the workflow:
289
290- `CSC_LINK`
291- `CSC_KEY_PASSWORD`
292- `APPLE_API_KEY`
293- `APPLE_API_KEY_ID`
294- `APPLE_API_ISSUER`
295- `MACOS_PROVISIONING_PROFILE` (base64-encoded provisioning profile with Associated Domains)
296
297Required repository variables:
298
299- `APPLE_TEAM_ID`
300
301Optional repository variables:
302
303- `CLERK_PASSKEY_RP_DOMAINS`: comma-separated RP-domain override. By default, the build derives the
304 domain from the production Clerk publishable key.
305
306Checklist:
307
3081. Apple Developer account access:
309 - Team has rights to create Developer ID certificates.
3102. Create an explicit App ID for `com.t3tools.t3code` and enable Associated Domains.
3113. Create a `Developer ID Application` certificate and a compatible provisioning profile for that
312 App ID with Associated Domains enabled.
3134. Export the certificate + private key as `.p12` from Keychain.
3145. Base64-encode the `.p12` and store as `CSC_LINK`.
3156. Base64-encode the provisioning profile and store it as `MACOS_PROVISIONING_PROFILE`.
3167. Store the `.p12` export password as `CSC_KEY_PASSWORD`, and set `APPLE_TEAM_ID` to the
317 10-character Apple Developer Team ID.
3188. In App Store Connect, create an API key (Team key).
3199. Add API key values:
320 - `APPLE_API_KEY`: contents of the downloaded `.p8`
321 - `APPLE_API_KEY_ID`: Key ID
322 - `APPLE_API_ISSUER`: Issuer ID
32310. Complete the Clerk Native API and AASA setup in [T3 Connect Clerk Setup](../internals/t3-connect.md#desktop-passkeys).
32411. Re-run a tag release and confirm macOS artifacts are signed/notarized and contain the expected
325 `com.apple.developer.associated-domains` entitlement.
326
327Notes:
328
329- `APPLE_API_KEY` is stored as raw key text in secrets.
330- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
331- The workflow decodes `MACOS_PROVISIONING_PROFILE`, validates it with `security cms`, and passes it
332 to the desktop packager.
333
334## 3) Azure Trusted Signing setup (Windows)
335
336Required secrets used by the workflow:
337
338- `AZURE_TENANT_ID`
339- `AZURE_CLIENT_ID`
340- `AZURE_CLIENT_SECRET`
341- `AZURE_TRUSTED_SIGNING_ENDPOINT`
342- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
343- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
344- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
345
346Checklist:
347
3481. Create Azure Trusted Signing account and certificate profile.
3492. Record ATS values:
350 - Endpoint
351 - Account name
352 - Certificate profile name
353 - Publisher name
3543. Create/choose an Entra app registration (service principal).
3554. Grant service principal permissions required by Trusted Signing.
3565. Create a client secret for the service principal.
3576. Add Azure secrets listed above in GitHub Actions secrets.
3587. Re-run a tag release and confirm Windows installer is signed.
359
360## 4) Ongoing release checklist
361
3621. Ensure `main` is green in CI.
3632. Bump app version as needed.
3643. Create release tag: `vX.Y.Z`.
3654. Push tag.
3665. Verify workflow steps:
367 - preflight passes
368 - all matrix builds pass
369 - `publish_cli` publishes the exact release version before the release job
370 - release job uploads expected files
3716. Smoke test downloaded artifacts.
372
373## 5) Troubleshooting
374
375- macOS build unsigned when expected signed:
376 - Check all Apple secrets plus `APPLE_TEAM_ID` are populated and non-empty.
377 - Confirm the provisioning profile belongs to `APPLE_TEAM_ID.com.t3tools.t3code` and includes
378 Associated Domains.
379- Windows build unsigned when expected signed:
380 - Check all Azure ATS and auth secrets are populated and non-empty.
381- Build fails with signing error:
382 - Retry with secrets removed to confirm unsigned path still works.
383 - Re-check certificate/profile names and tenant/client credentials.