Open History to see the last commit
1# Release Checklist
2
3This document covers the unified release workflow for stable and nightly desktop releases.
4
5## What the workflow does
6
7- Workflow: `.github/workflows/release.yml`
8- Triggers:
9 - push tag matching `v*.*.*` for stable releases
10 - scheduled nightly at `09:00 UTC`
11 - manual `workflow_dispatch` for either channel
12- Runs quality gates first: lint, typecheck, test.
13- Builds four artifacts in parallel for both channels:
14 - macOS `arm64` DMG
15 - macOS `x64` DMG
16 - Linux `x64` AppImage
17 - Windows `x64` NSIS installer
18- Publishes one GitHub Release with all produced files.
19 - Stable tags with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
20 - Only plain stable `X.Y.Z` releases are marked as the repository's latest release.
21 - Nightly runs are always GitHub prereleases and never marked latest.
22 - 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.
23- Includes Electron auto-update metadata (for example `latest*.yml`, `nightly*.yml`, and `*.blockmap`) in release assets.
24- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing from the same workflow file:
25 - stable releases publish npm dist-tag `latest`
26 - nightly releases publish npm dist-tag `nightly`
27- Signing is optional and auto-detected per platform from secrets.
28
29## Nightly builds
30
31- Workflow: `.github/workflows/release.yml`
32- Triggers:
33 - scheduled every day at `09:00 UTC`
34 - manual `workflow_dispatch` with `channel=nightly`
35- Runs the same desktop quality gates and artifact matrix as the tagged release flow.
36- Publishes a GitHub prerelease only:
37 - tag format: `nightly-vX.Y.Z-nightly.YYYYMMDD.<run_number>`
38 - release name includes the short commit SHA
39 - `make_latest` is always `false`
40- Uses the next stable patch version as the nightly base. For example, `0.0.17` produces nightlies on `0.0.18-nightly.*`.
41- Publishes Electron auto-update metadata to the dedicated `nightly` updater channel, so desktop users can opt into that track independently from stable.
42- Publishes the CLI package (`apps/server`, npm package `t3`) to the `nightly` npm dist-tag using the same nightly version.
43- Does not commit version bumps back to `main`.
44
45## Desktop auto-update notes
46
47- Runtime updater: `electron-updater` in `apps/desktop/src/main.ts`.
48- Update UX:
49 - Background checks run on startup delay + interval.
50 - No automatic download or install.
51 - The desktop UI shows a rocket update button when an update is available; click once to download, click again after download to restart/install.
52- Provider: GitHub Releases (`provider: github`) configured at build time.
53- Repository slug source:
54 - `T3CODE_DESKTOP_UPDATE_REPOSITORY` (format `owner/repo`), if set.
55 - otherwise `GITHUB_REPOSITORY` from GitHub Actions.
56- Temporary private-repo auth workaround:
57 - set `T3CODE_DESKTOP_UPDATE_GITHUB_TOKEN` (or `GH_TOKEN`) in the desktop app runtime environment.
58 - the app forwards it as an `Authorization: Bearer <token>` request header for updater HTTP calls.
59- Required release assets for updater:
60 - platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
61 - channel metadata: `latest*.yml` for stable releases, `nightly*.yml` for nightly releases
62 - `*.blockmap` files (used for differential downloads)
63- macOS metadata note:
64 - `electron-updater` reads `latest-mac.yml` on stable and `nightly-mac.yml` on nightly, for both Intel and Apple Silicon.
65 - The workflow merges the per-arch mac manifests into one channel-specific mac manifest before publishing the GitHub Release.
66
67## 0) npm OIDC trusted publishing setup (CLI)
68
69The workflow publishes the CLI with `npm publish` from `apps/server` after bumping
70the package version to the release tag version.
71
72Checklist:
73
741. Confirm npm org/user owns package `t3` (or rename package first if needed).
752. In npm package settings, configure Trusted Publisher:
76 - Provider: GitHub Actions
77 - Repository: this repo
78 - Workflow file: `.github/workflows/release.yml`
79 - Environment (if used): match your npm trusted publishing config
803. Ensure npm account and org policies allow trusted publishing for the package.
814. Create release tag `vX.Y.Z` and push; workflow will:
82 - set `apps/server/package.json` version to `X.Y.Z`
83 - build web + server
84 - run `npm publish --access public --tag latest`
855. Nightly runs from the same workflow file publish with `npm publish --access public --tag nightly`.
86
87## 1) Dry-run release without signing
88
89Use this first to validate the release pipeline.
90
911. Confirm no signing secrets are required for this test.
922. Create a test tag:
93 - `git tag v0.0.0-test.1`
94 - `git push origin v0.0.0-test.1`
953. Wait for `.github/workflows/release.yml` to finish.
964. Verify the GitHub Release contains all platform artifacts.
975. Download each artifact and sanity-check installation on each OS.
98
99## 2) Apple signing + notarization setup (macOS)
100
101Required secrets used by the workflow:
102
103- `CSC_LINK`
104- `CSC_KEY_PASSWORD`
105- `APPLE_API_KEY`
106- `APPLE_API_KEY_ID`
107- `APPLE_API_ISSUER`
108
109Checklist:
110
1111. Apple Developer account access:
112 - Team has rights to create Developer ID certificates.
1132. Create `Developer ID Application` certificate.
1143. Export certificate + private key as `.p12` from Keychain.
1154. Base64-encode the `.p12` and store as `CSC_LINK`.
1165. Store the `.p12` export password as `CSC_KEY_PASSWORD`.
1176. In App Store Connect, create an API key (Team key).
1187. Add API key values:
119 - `APPLE_API_KEY`: contents of the downloaded `.p8`
120 - `APPLE_API_KEY_ID`: Key ID
121 - `APPLE_API_ISSUER`: Issuer ID
1228. Re-run a tag release and confirm macOS artifacts are signed/notarized.
123
124Notes:
125
126- `APPLE_API_KEY` is stored as raw key text in secrets.
127- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
128
129## 3) Azure Trusted Signing setup (Windows)
130
131Required secrets used by the workflow:
132
133- `AZURE_TENANT_ID`
134- `AZURE_CLIENT_ID`
135- `AZURE_CLIENT_SECRET`
136- `AZURE_TRUSTED_SIGNING_ENDPOINT`
137- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
138- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
139- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
140
141Checklist:
142
1431. Create Azure Trusted Signing account and certificate profile.
1442. Record ATS values:
145 - Endpoint
146 - Account name
147 - Certificate profile name
148 - Publisher name
1493. Create/choose an Entra app registration (service principal).
1504. Grant service principal permissions required by Trusted Signing.
1515. Create a client secret for the service principal.
1526. Add Azure secrets listed above in GitHub Actions secrets.
1537. Re-run a tag release and confirm Windows installer is signed.
154
155## 4) Ongoing release checklist
156
1571. Ensure `main` is green in CI.
1582. Bump app version as needed.
1593. Create release tag: `vX.Y.Z`.
1604. Push tag.
1615. Verify workflow steps:
162 - preflight passes
163 - all matrix builds pass
164 - release job uploads expected files
1656. Smoke test downloaded artifacts.
166
167## 5) Troubleshooting
168
169- macOS build unsigned when expected signed:
170 - Check all Apple secrets are populated and non-empty.
171- Windows build unsigned when expected signed:
172 - Check all Azure ATS and auth secrets are populated and non-empty.
173- Build fails with signing error:
174 - Retry with secrets removed to confirm unsigned path still works.
175 - Re-check certificate/profile names and tenant/client credentials.