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

release.md

154 lines5.8 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 five artifacts in parallel:
10 - macOS `arm64` DMG
11 - macOS `x64` DMG
12 - Linux `x64` AppImage
13 - Linux `x64` `.deb`
14 - Windows `x64` NSIS installer
15- Publishes one GitHub Release with all produced files.
16 - Versions with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
17 - Only plain `X.Y.Z` releases are marked as the repository's latest release.
18- Includes Electron auto-update metadata (for example `latest*.yml` and `*.blockmap`) in release assets.
19- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing.
20- Signing is optional and auto-detected per platform from secrets.
21​
22## Desktop auto-update notes
23​
24- Runtime updater: `electron-updater` in `apps/desktop/src/main.ts`.
25- Update UX:
26 - Background checks run on startup delay + interval.
27 - No automatic download or install.
28 - The desktop UI shows a rocket update button when an update is available; click once to download, click again after download to restart/install.
29- Provider: GitHub Releases (`provider: github`) configured at build time.
30- Repository slug source:
31 - `T3CODE_DESKTOP_UPDATE_REPOSITORY` (format `owner/repo`), if set.
32 - otherwise `GITHUB_REPOSITORY` from GitHub Actions.
33- Temporary private-repo auth workaround:
34 - set `T3CODE_DESKTOP_UPDATE_GITHUB_TOKEN` (or `GH_TOKEN`) in the desktop app runtime environment.
35 - the app forwards it as an `Authorization: Bearer <token>` request header for updater HTTP calls.
36- Required release assets for updater:
37 - platform installers used by updater (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
38 - `latest*.yml` metadata
39 - `*.blockmap` files (used for differential downloads)
40- Linux `.deb` note:
41 - `.deb` packages are published as release assets for manual installation.
42 - Linux auto-update remains AppImage-only.
43- macOS metadata note:
44 - `electron-updater` reads `latest-mac.yml` for both Intel and Apple Silicon.
45 - The workflow merges the per-arch mac manifests into one `latest-mac.yml` before publishing the GitHub Release.
46​
47## 0) npm OIDC trusted publishing setup (CLI)
48​
49The workflow publishes the CLI with `bun publish` from `apps/server` after bumping
50the package version to the release tag version.
51​
52Checklist:
53​
541. Confirm npm org/user owns package `t3` (or rename package first if needed).
552. In npm package settings, configure Trusted Publisher:
56 - Provider: GitHub Actions
57 - Repository: this repo
58 - Workflow file: `.github/workflows/release.yml`
59 - Environment (if used): match your npm trusted publishing config
603. Ensure npm account and org policies allow trusted publishing for the package.
614. Create release tag `vX.Y.Z` and push; workflow will:
62 - set `apps/server/package.json` version to `X.Y.Z`
63 - build web + server
64 - run `bun publish --access public`
65​
66## 1) Dry-run release without signing
67​
68Use this first to validate the release pipeline.
69​
701. Confirm no signing secrets are required for this test.
712. Create a test tag:
72 - `git tag v0.0.0-test.1`
73 - `git push origin v0.0.0-test.1`
743. Wait for `.github/workflows/release.yml` to finish.
754. Verify the GitHub Release contains all platform artifacts.
765. Download each artifact and sanity-check installation on each OS.
77​
78## 2) Apple signing + notarization setup (macOS)
79​
80Required secrets used by the workflow:
81​
82- `CSC_LINK`
83- `CSC_KEY_PASSWORD`
84- `APPLE_API_KEY`
85- `APPLE_API_KEY_ID`
86- `APPLE_API_ISSUER`
87​
88Checklist:
89​
901. Apple Developer account access:
91 - Team has rights to create Developer ID certificates.
922. Create `Developer ID Application` certificate.
933. Export certificate + private key as `.p12` from Keychain.
944. Base64-encode the `.p12` and store as `CSC_LINK`.
955. Store the `.p12` export password as `CSC_KEY_PASSWORD`.
966. In App Store Connect, create an API key (Team key).
977. Add API key values:
98 - `APPLE_API_KEY`: contents of the downloaded `.p8`
99 - `APPLE_API_KEY_ID`: Key ID
100 - `APPLE_API_ISSUER`: Issuer ID
1018. Re-run a tag release and confirm macOS artifacts are signed/notarized.
102​
103Notes:
104​
105- `APPLE_API_KEY` is stored as raw key text in secrets.
106- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
107​
108## 3) Azure Trusted Signing setup (Windows)
109​
110Required secrets used by the workflow:
111​
112- `AZURE_TENANT_ID`
113- `AZURE_CLIENT_ID`
114- `AZURE_CLIENT_SECRET`
115- `AZURE_TRUSTED_SIGNING_ENDPOINT`
116- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
117- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
118- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
119​
120Checklist:
121​
1221. Create Azure Trusted Signing account and certificate profile.
1232. Record ATS values:
124 - Endpoint
125 - Account name
126 - Certificate profile name
127 - Publisher name
1283. Create/choose an Entra app registration (service principal).
1294. Grant service principal permissions required by Trusted Signing.
1305. Create a client secret for the service principal.
1316. Add Azure secrets listed above in GitHub Actions secrets.
1327. Re-run a tag release and confirm Windows installer is signed.
133​
134## 4) Ongoing release checklist
135​
1361. Ensure `main` is green in CI.
1372. Bump app version as needed.
1383. Create release tag: `vX.Y.Z`.
1394. Push tag.
1405. Verify workflow steps:
141 - preflight passes
142 - all matrix builds pass
143 - release job uploads expected files
1446. Smoke test downloaded artifacts.
145​
146## 5) Troubleshooting
147​
148- macOS build unsigned when expected signed:
149 - Check all Apple secrets are populated and non-empty.
150- Windows build unsigned when expected signed:
151 - Check all Azure ATS and auth secrets are populated and non-empty.
152- Build fails with signing error:
153 - Retry with secrets removed to confirm unsigned path still works.
154 - Re-check certificate/profile names and tenant/client credentials.