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- Windows artifacts are WSL-capable by default. The release captures its own Linux Node runtime and audits it with the WSL native runtime inside an Ubuntu 22.04 compatibility container (glibc 2.35) on an Ubuntu 24.04 runner, smoke-tests the same bytes again on Ubuntu 24.04, and Windows packaging fails closed unless every staged Linux runtime/native hash matches that receipt exactly.
22- Publishes one GitHub Release with all produced files.
23 - Stable tags with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
24 - Only plain stable `X.Y.Z` releases are marked as the repository's latest release.
25 - Nightly runs are always GitHub prereleases and never marked latest.
26 - 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.
27- Includes Electron auto-update metadata (for example `latest*.yml`, `nightly*.yml`, and `*.blockmap`) in release assets.
28- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing from the same workflow file:
29 - stable releases publish npm dist-tag `latest`
30 - nightly releases publish npm dist-tag `nightly`
31- Deploys the hosted web app to Vercel only after a release is published:
32 - stable releases are aliased to the `latest` hosted app channel
33 - nightly releases are aliased to the `nightly` hosted app channel
34- Signing is optional and auto-detected per platform from secrets.
35
36## Required release credentials
37
38Stable releases require these GitHub Actions secrets in addition to the platform and deployment
39credentials documented below:
40
41- `RELEASE_APP_ID`
42- `RELEASE_APP_PRIVATE_KEY`
43
44The finalize job uses them to commit and push aligned package versions to `main` as the Release App.
45GitHub Release publication uses the repository-scoped workflow token so it has a rate-limit quota
46independent from the shared Release App installation.
47
48## T3 Connect relay deployment
49
50The relay is a shared control plane versioned separately from client releases. Stable and nightly
51client builds must point at the same relay so users see the same linked environments when switching
52release channels.
53
54`.github/workflows/deploy-relay.yml` deploys Alchemy stage `prod` on every push to `main`. The
55release workflow reads the relay URL and Clerk client configuration from the existing `production`
56GitHub Actions environment before building desktop, CLI, or hosted web artifacts.
57
58Required repository variables shared by relay deployments:
59
60- `CLOUDFLARE_ACCOUNT_ID`
61- `PLANETSCALE_ORGANIZATION`
62- `AXIOM_ORG_ID`
63
64Required repository secrets shared by relay deployments:
65
66- `CLOUDFLARE_API_TOKEN`
67- `PLANETSCALE_API_TOKEN_ID`
68- `PLANETSCALE_API_TOKEN`
69- `AXIOM_TOKEN`
70
71Required `production` environment variables:
72
73- `RELAY_API_ZONE_NAME`
74- `RELAY_TUNNEL_ZONE_NAME`
75- `CLERK_PUBLISHABLE_KEY`
76- `CLERK_JWT_AUDIENCE`
77- `CLERK_JWT_TEMPLATE`
78- `CLERK_CLI_OAUTH_CLIENT_ID`
79- `APNS_ENVIRONMENT`
80- `APNS_TEAM_ID`
81- `APNS_KEY_ID`
82- `APNS_BUNDLE_ID`
83
84Optional `production` environment variables:
85
86- `RELAY_DOMAIN` when overriding the derived `relay.<RELAY_API_ZONE_NAME>` domain
87
88Required `production` environment secrets:
89
90- `CLERK_SECRET_KEY`
91- `APNS_PRIVATE_KEY`
92
93The account-scoped repository credentials are consumed by Alchemy while provisioning relay stages; they
94are not bound into the relay Worker. The production deployment uses an Axiom personal access token,
95so `AXIOM_ORG_ID` must accompany `AXIOM_TOKEN`. The `prod` stage owns the retained PlanetScale
96database. Local personal stages provision isolated branches from it and are never deployed by CI.
97Production adopts the configured relay API and tunnel DNS zones as retained Cloudflare resources.
98Personal stages reference the production-owned zones.
99
100Developers deploy personal stages locally rather than through pull-request automation:
101
102```sh
103vp run --filter t3code-relay deploy -- --stage "$USER" --env-file .env.local
104```
105
106## Hosted web app release deployment
107
108The hosted app is intentionally not deployed by Vercel's Git integration. The
109web project disables automatic Git deployments in `apps/web/vercel.ts` via
110`git.deploymentEnabled: false`, and `.github/workflows/release.yml` deploys the
111web app with Vercel CLI after the GitHub Release succeeds.
112
113Required GitHub Actions secrets:
114
115- `VERCEL_TOKEN`
116- `VERCEL_ORG_ID`
117- `VERCEL_PROJECT_ID`
118
119Optional GitHub Actions variables:
120
121- `VERCEL_TEAM_SLUG`: overrides the Vercel CLI scope when the team slug is preferred over the `VERCEL_ORG_ID` secret.
122- `T3CODE_WEB_ROUTER_URL`: defaults to `https://app.t3.codes`.
123- `T3CODE_WEB_LATEST_DOMAIN`: defaults to `latest.app.t3.codes`.
124- `T3CODE_WEB_NIGHTLY_DOMAIN`: defaults to `nightly.app.t3.codes`.
125
126Required Vercel domains:
127
128- `app.t3.codes`: the router domain users open, updated by stable releases.
129- `latest.app.t3.codes`: channel alias updated by stable releases.
130- `nightly.app.t3.codes`: channel alias updated by nightly releases.
131
132The router domain uses `apps/web/vercel.ts` routes. Users opt into a channel by
133visiting `/__t3code/channel?channel=latest` or
134`/__t3code/channel?channel=nightly`; the router stores the
135`t3code_web_channel` cookie and rewrites future requests on `app.t3.codes` to
136the matching channel alias.
137
138The release deploy job rewrites release package versions before upload so the
139hosted app's About panel renders the release version. Stable deploys alias the
140same deployment to both the `latest` channel and the router domain so the router
141rules stay current. Nightly deploys only alias the `nightly` channel. The job
142also passes `VITE_HOSTED_APP_CHANNEL=latest|nightly`, which renders the hosted
143update track selector in the About panel. Changing the selector navigates
144through `/__t3code/channel` on the router domain so the user's channel cookie is
145updated before redirecting to the hosted app root.
146
147One-time Vercel dashboard setup:
148
1491. Confirm the web project root directory remains `apps/web`.
1502. Add the three domains above to the web project.
1513. Disable automatic Git deployments in the dashboard if desired; the committed
152 `vercel.ts` setting is the source-of-truth, but disconnecting Git in the
153 dashboard is also safe.
1544. Run one stable release deployment, or manually alias the current stable
155 deployment, so `app.t3.codes` points at a deployment containing the router
156 rules in `apps/web/vercel.ts`. Future stable releases keep this alias current.
157
158## Nightly builds
159
160- Workflow: `.github/workflows/release.yml`
161- Triggers:
162 - scheduled check every three hours
163 - manual `workflow_dispatch` with `channel=nightly`
164- Runs the same desktop quality gates and artifact matrix as the tagged release flow.
165- Publishes a GitHub prerelease only:
166 - current tag format: `vX.Y.Z-nightly.YYYYMMDD.<run_number>`
167 - `nightly-v...` is accepted only as a legacy previous-nightly tag
168 - release name includes the short commit SHA
169 - `make_latest` is always `false`
170- Uses the next stable patch version as the nightly base. For example, `0.0.17` produces nightlies on `0.0.18-nightly.*`.
171- Publishes Electron auto-update metadata to the dedicated `nightly` updater channel, so desktop users can opt into that track independently from stable.
172- Publishes the CLI package (`apps/server`, npm package `t3`) to the `nightly` npm dist-tag using the same nightly version.
173- Does not commit version bumps back to `main`.
174
175## Server self-update release invariant
176
177Connected servers update to the client's exact version, not to an npm dist-tag. Every released
178desktop or hosted client version must therefore have a matching `t3@<version>` package available on
179npm before users can receive that client.
180
181The workflow enforces this ordering:
182
1831. `publish_cli` publishes the exact stable or nightly version to npm.
1842. `release` depends on `publish_cli` before exposing desktop artifacts in GitHub Releases.
1853. `deploy_web` depends on `release` before moving the hosted channel to the new client.
186
187Preserve these dependencies when changing the release graph. Publishing a client first would leave
188the **Update server** action targeting a package version that does not exist yet.
189
190For a release smoke test, confirm `npm view t3@<version> version` returns the expected version, then
191connect the new client to a server on the previous version and verify that the update action
192reconnects to the matching server. Use releases with identical migration manifests for the
193automatic path. When the manifest changed, verify that the remote action stops before restart and
194shows the exact local `npx t3@<version> service update` command. Also test the manual or
195desktop-managed guidance when those environments are available.
196
197## Desktop auto-update notes
198
199- Updater runtime: `apps/desktop/src/updates/DesktopUpdates.ts`.
200- `electron-updater` adapter: `apps/desktop/src/electron/ElectronUpdater.ts`.
201- `apps/desktop/src/main.ts` only wires the updater layers into the desktop runtime.
202- Update UX:
203 - Background checks run on startup delay + interval.
204 - No automatic download or install.
205 - The desktop UI shows a rocket update button when an update is available; click once to download, click again after download to restart/install.
206- Provider: GitHub Releases (`provider: github`) configured at build time.
207- Repository slug source:
208 - `T3CODE_DESKTOP_UPDATE_REPOSITORY` (format `owner/repo`), if set.
209 - otherwise `GITHUB_REPOSITORY` from GitHub Actions.
210- Required release assets for updater:
211 - platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
212 - channel metadata: `latest*.yml` for stable releases, `nightly*.yml` for nightly releases
213 - `*.blockmap` files (used for differential downloads)
214- macOS metadata note:
215 - `electron-updater` reads `latest-mac.yml` on stable and `nightly-mac.yml` on nightly, for both Intel and Apple Silicon.
216 - The workflow merges the per-arch mac manifests into one channel-specific mac manifest before publishing the GitHub Release.
217
218## 0) npm OIDC trusted publishing setup (CLI)
219
220The workflow invokes `node apps/server/scripts/cli.ts publish` after aligning package versions. That
221script temporarily prepares the `t3` package, then runs `vp pm publish --filter t3 ...` from the
222repository root so workspace publish configuration is applied correctly.
223
224Checklist:
225
2261. Confirm npm org/user owns package `t3` (or rename package first if needed).
2272. In npm package settings, configure Trusted Publisher:
228 - Provider: GitHub Actions
229 - Repository: this repo
230 - Workflow file: `.github/workflows/release.yml`
231 - Environment (if used): match your npm trusted publishing config
2323. Ensure npm account and org policies allow trusted publishing for the package.
2334. Create release tag `vX.Y.Z` and push; workflow will:
234 - align the release package versions to `X.Y.Z`
235 - build web + server
236 - invoke the CLI publish script with npm dist-tag `latest`
2375. Nightly runs invoke the same publish script with npm dist-tag `nightly`.
238
239## 1) Release validation and unsigned builds
240
241There is no dry-run tag path. Pushing any accepted non-nightly tag, including
242`v0.0.0-test.1`, classifies the run as the stable channel. It publishes `t3` with npm dist-tag
243`latest`, creates a real GitHub Release, aliases the hosted app to `latest.app.t3.codes` and
244`app.t3.codes`, and can commit a version bump to `main` in the finalize job. Do not push a test tag
245to validate the workflow.
246
247The workflow has no non-publishing `workflow_dispatch` mode. Use normal CI or local quality gates to
248validate checks and builds without shipping. To exercise the complete release graph at lower stable
249risk, manually dispatch `channel=nightly`; this still publishes a real nightly npm package, GitHub
250prerelease, desktop updater release, and hosted nightly alias, but it does not update stable aliases or
251commit a version bump to `main`. Only run it when a real nightly release is acceptable.
252
253Manual `channel=stable` with a version input is also a real stable-channel release. Omitting signing
254secrets only makes platform artifacts unsigned; it does not prevent publication.
255
256## 1a) Windows WSL packaging invariant
257
258A normal Windows desktop artifact **includes WSL support by default**. `scripts/build-desktop-artifact.ts`
259now treats that as a release contract rather than an optional best-effort feature:
260
261- `--wsl-prebuild <path-to-linux-pty.node>` (or `T3CODE_DESKTOP_WSL_PREBUILD`) is required for a WSL-capable Windows build.
262- The prebuild directory must also contain `wsl-native-abi.json`, generated by `scripts/audit-wsl-native-abi.mjs` inside the declared Ubuntu 22.04 compatibility-floor container. The job intentionally uses an Ubuntu 24.04 host runner so the ABI baseline does not depend on the retiring `ubuntu-22.04` runner label.
263- The ABI audit checks ELF class/machine, unresolved dynamic dependencies, and required `GLIBC_*`, `GLIBCXX_*`, and `CXXABI_*` symbol versions for the bundled Linux Node executable, `node-pty`, the Linux `fff` binary, and Linux `ffi-rs`.
264- The declared glibc ceiling is 2.35. The libstdc++/CXXABI ceilings are derived from the Ubuntu 22.04 compatibility container's actual `libstdc++.so.6` and serialized into the receipt.
265- The same runtime/native bytes are smoke-tested on Ubuntu 22.04 and Ubuntu 24.04 before Windows packaging is allowed to proceed; the smoke script itself runs under the bundled Linux Node executable.
266- After staged production dependencies are installed on Windows, packaging verifies the server entry, `effect`, bundled Linux Node, `node-pty`, Linux `fff`, and Linux `ffi-rs`, then compares SHA-256 for all four Linux runtime/native artifacts against the ABI receipt. Package-resolution drift therefore fails closed.
267- The staged app records the capability contract in `apps/desktop/prod-resources/wsl-capability.json` and embeds the ABI receipt as `apps/desktop/prod-resources/wsl-native-abi.json`.
268- Packaged runtime preflight never discovers Node from the user's WSL shell. It converts the packaged `resources/wsl-node/bin/node` path inside the already-pinned distro, hashes and copies those audited bytes into a per-distro Linux cache, restores executable permission there, and uses that exact cached Node for native probing, Linux-side port allocation, and final server launch. Development builds keep the existing user-Node/node-gyp path.
269- This bundled executable is the server runtime, not a replacement for every provider package manager. `npm`, `pnpm`, `bun`, and provider CLIs are still discovered from the distro/user PATH when a provider install or update requires them.
270- Runtime WSL preflight reports the selected distro's libc family/version before loading `node-pty`: known GNU glibc versions below 2.35 and musl-based distros fail with an actionable compatibility message, while an unknown libc identity is allowed to reach the real native load probe.
271- If any required WSL asset is absent, any ABI ceiling is exceeded, any runtime smoke fails, or any staged native hash differs from the audited bytes, the Windows build fails instead of producing an installer whose WSL toggle may fail at runtime.
272
273The release workflow downloads the ABI-audited artifact produced by `build_wsl_node_pty` and passes
274`pty.node` to the Windows packaging command; the adjacent Linux `node` executable and ABI receipt are
275consumed automatically. Electron Builder promotes the staged Node executable to `resources/wsl-node`
276outside `app.asar`, because WSL must read it through the Windows filesystem before copying it into the
277Linux cache. Keep that dependency, receipt, external-resource rule, validation job, and argument intact.
278
279For deliberate Windows-only development artifacts, opt out explicitly:
280
281```sh
282vp run dist:desktop:artifact -- --win --without-wsl
283```
284
285The equivalent environment switch is `T3CODE_DESKTOP_WITHOUT_WSL=true`. Do not use this opt-out for
286normal release artifacts. It exists so local Windows packaging can be intentionally host-only without
287being mistaken for a WSL-capable build.
288
289## 2) Apple signing + notarization setup (macOS)
290
291Required secrets used by the workflow:
292
293- `CSC_LINK`
294- `CSC_KEY_PASSWORD`
295- `APPLE_API_KEY`
296- `APPLE_API_KEY_ID`
297- `APPLE_API_ISSUER`
298- `MACOS_PROVISIONING_PROFILE` (base64-encoded provisioning profile with Associated Domains)
299
300Required repository variables:
301
302- `APPLE_TEAM_ID`
303
304Optional repository variables:
305
306- `CLERK_PASSKEY_RP_DOMAINS`: comma-separated RP-domain override. By default, the build derives the
307 domain from the production Clerk publishable key.
308
309Checklist:
310
3111. Apple Developer account access:
312 - Team has rights to create Developer ID certificates.
3132. Create an explicit App ID for `com.t3tools.t3code` and enable Associated Domains.
3143. Create a `Developer ID Application` certificate and a compatible provisioning profile for that
315 App ID with Associated Domains enabled.
3164. Export the certificate + private key as `.p12` from Keychain.
3175. Base64-encode the `.p12` and store as `CSC_LINK`.
3186. Base64-encode the provisioning profile and store it as `MACOS_PROVISIONING_PROFILE`.
3197. Store the `.p12` export password as `CSC_KEY_PASSWORD`, and set `APPLE_TEAM_ID` to the
320 10-character Apple Developer Team ID.
3218. In App Store Connect, create an API key (Team key).
3229. Add API key values:
323 - `APPLE_API_KEY`: contents of the downloaded `.p8`
324 - `APPLE_API_KEY_ID`: Key ID
325 - `APPLE_API_ISSUER`: Issuer ID
32610. Complete the Clerk Native API and AASA setup in [T3 Connect Clerk Setup](../internals/t3-connect.md#desktop-passkeys).
32711. Re-run a tag release and confirm macOS artifacts are signed/notarized and contain the expected
328 `com.apple.developer.associated-domains` entitlement.
329
330Notes:
331
332- `APPLE_API_KEY` is stored as raw key text in secrets.
333- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
334- The workflow decodes `MACOS_PROVISIONING_PROFILE`, validates it with `security cms`, and passes it
335 to the desktop packager.
336
337## 3) Azure Trusted Signing setup (Windows)
338
339Required secrets used by the workflow:
340
341- `AZURE_TENANT_ID`
342- `AZURE_CLIENT_ID`
343- `AZURE_CLIENT_SECRET`
344- `AZURE_TRUSTED_SIGNING_ENDPOINT`
345- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
346- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
347- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
348
349Checklist:
350
3511. Create Azure Trusted Signing account and certificate profile.
3522. Record ATS values:
353 - Endpoint
354 - Account name
355 - Certificate profile name
356 - Publisher name
3573. Create/choose an Entra app registration (service principal).
3584. Grant service principal permissions required by Trusted Signing.
3595. Create a client secret for the service principal.
3606. Add Azure secrets listed above in GitHub Actions secrets.
3617. Re-run a tag release and confirm Windows installer is signed.
362
363## 4) Ongoing release checklist
364
3651. Ensure `main` is green in CI.
3662. Bump app version as needed.
3673. Create release tag: `vX.Y.Z`.
3684. Push tag.
3695. Verify workflow steps:
370 - preflight passes
371 - all matrix builds pass
372 - `publish_cli` publishes the exact release version before the release job
373 - release job uploads expected files
3746. Smoke test downloaded artifacts.
375
376## 5) Troubleshooting
377
378- macOS build unsigned when expected signed:
379 - Check all Apple secrets plus `APPLE_TEAM_ID` are populated and non-empty.
380 - Confirm the provisioning profile belongs to `APPLE_TEAM_ID.com.t3tools.t3code` and includes
381 Associated Domains.
382- Windows build unsigned when expected signed:
383 - Check all Azure ATS and auth secrets are populated and non-empty.
384- Build fails with signing error:
385 - Retry with secrets removed to confirm unsigned path still works.
386 - Re-check certificate/profile names and tenant/client credentials.