Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

release.md

145 lines5.3 KB

1# Release Checklist
2​
3This document covers how to run desktop releases from one tag, first without signing, then with signing.
4​
5## What the workflow does
6​
7- Trigger: push tag matching `v*.*.*`.
8- Runs quality gates first: lint, typecheck, test.
9- Builds four artifacts in parallel:
10 - macOS `arm64` DMG
11 - macOS `x64` DMG
12 - Linux `x64` AppImage
13 - Windows `x64` NSIS installer
14- Publishes one GitHub Release with all produced files.
15- Includes Electron auto-update metadata (for example `latest*.yml` and `*.blockmap`) in release assets.
16- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing.
17- Signing is optional and auto-detected per platform from secrets.
18​
19## Desktop auto-update notes
20​
21- Runtime updater: `electron-updater` in `apps/desktop/src/main.ts`.
22- Update UX:
23 - Background checks run on startup delay + interval.
24 - No automatic download or install.
25 - The desktop UI shows a rocket update button when an update is available; click once to download, click again after download to restart/install.
26- Provider: GitHub Releases (`provider: github`) configured at build time.
27- Repository slug source:
28 - `T3CODE_DESKTOP_UPDATE_REPOSITORY` (format `owner/repo`), if set.
29 - otherwise `GITHUB_REPOSITORY` from GitHub Actions.
30- Temporary private-repo auth workaround:
31 - set `T3CODE_DESKTOP_UPDATE_GITHUB_TOKEN` (or `GH_TOKEN`) in the desktop app runtime environment.
32 - the app forwards it as an `Authorization: Bearer <token>` request header for updater HTTP calls.
33- Required release assets for updater:
34 - platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
35 - `latest*.yml` metadata
36 - `*.blockmap` files (used for differential downloads)
37​
38## 0) npm OIDC trusted publishing setup (CLI)
39​
40The workflow publishes the CLI with `bun publish` from `apps/server` after bumping
41the package version to the release tag version.
42​
43Checklist:
44​
451. Confirm npm org/user owns package `t3` (or rename package first if needed).
462. In npm package settings, configure Trusted Publisher:
47 - Provider: GitHub Actions
48 - Repository: this repo
49 - Workflow file: `.github/workflows/release.yml`
50 - Environment (if used): match your npm trusted publishing config
513. Ensure npm account and org policies allow trusted publishing for the package.
524. Create release tag `vX.Y.Z` and push; workflow will:
53 - set `apps/server/package.json` version to `X.Y.Z`
54 - build web + server
55 - run `bun publish --access public`
56​
57## 1) Dry-run release without signing
58​
59Use this first to validate the release pipeline.
60​
611. Confirm no signing secrets are required for this test.
622. Create a test tag:
63 - `git tag v0.0.0-test.1`
64 - `git push origin v0.0.0-test.1`
653. Wait for `.github/workflows/release.yml` to finish.
664. Verify the GitHub Release contains all platform artifacts.
675. Download each artifact and sanity-check installation on each OS.
68​
69## 2) Apple signing + notarization setup (macOS)
70​
71Required secrets used by the workflow:
72​
73- `CSC_LINK`
74- `CSC_KEY_PASSWORD`
75- `APPLE_API_KEY`
76- `APPLE_API_KEY_ID`
77- `APPLE_API_ISSUER`
78​
79Checklist:
80​
811. Apple Developer account access:
82 - Team has rights to create Developer ID certificates.
832. Create `Developer ID Application` certificate.
843. Export certificate + private key as `.p12` from Keychain.
854. Base64-encode the `.p12` and store as `CSC_LINK`.
865. Store the `.p12` export password as `CSC_KEY_PASSWORD`.
876. In App Store Connect, create an API key (Team key).
887. Add API key values:
89 - `APPLE_API_KEY`: contents of the downloaded `.p8`
90 - `APPLE_API_KEY_ID`: Key ID
91 - `APPLE_API_ISSUER`: Issuer ID
928. Re-run a tag release and confirm macOS artifacts are signed/notarized.
93​
94Notes:
95​
96- `APPLE_API_KEY` is stored as raw key text in secrets.
97- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
98​
99## 3) Azure Trusted Signing setup (Windows)
100​
101Required secrets used by the workflow:
102​
103- `AZURE_TENANT_ID`
104- `AZURE_CLIENT_ID`
105- `AZURE_CLIENT_SECRET`
106- `AZURE_TRUSTED_SIGNING_ENDPOINT`
107- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
108- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
109- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
110​
111Checklist:
112​
1131. Create Azure Trusted Signing account and certificate profile.
1142. Record ATS values:
115 - Endpoint
116 - Account name
117 - Certificate profile name
118 - Publisher name
1193. Create/choose an Entra app registration (service principal).
1204. Grant service principal permissions required by Trusted Signing.
1215. Create a client secret for the service principal.
1226. Add Azure secrets listed above in GitHub Actions secrets.
1237. Re-run a tag release and confirm Windows installer is signed.
124​
125## 4) Ongoing release checklist
126​
1271. Ensure `main` is green in CI.
1282. Bump app version as needed.
1293. Create release tag: `vX.Y.Z`.
1304. Push tag.
1315. Verify workflow steps:
132 - preflight passes
133 - all matrix builds pass
134 - release job uploads expected files
1356. Smoke test downloaded artifacts.
136​
137## 5) Troubleshooting
138​
139- macOS build unsigned when expected signed:
140 - Check all Apple secrets are populated and non-empty.
141- Windows build unsigned when expected signed:
142 - Check all Azure ATS and auth secrets are populated and non-empty.
143- Build fails with signing error:
144 - Retry with secrets removed to confirm unsigned path still works.
145 - Re-check certificate/profile names and tenant/client credentials.