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

release.md

150 lines5.7 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 - Versions with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
16 - Only plain `X.Y.Z` releases are marked as the repository's latest release.
17- Includes Electron auto-update metadata (for example `latest*.yml` and `*.blockmap`) in release assets.
18- Publishes the CLI package (`apps/server`, npm package `t3`) with OIDC trusted publishing.
19- Signing is optional and auto-detected per platform from secrets.
20​
21## Desktop auto-update notes
22​
23- Runtime updater: `electron-updater` in `apps/desktop/src/main.ts`.
24- Update UX:
25 - Background checks run on startup delay + interval.
26 - No automatic download or install.
27 - The desktop UI shows a rocket update button when an update is available; click once to download, click again after download to restart/install.
28- Provider: GitHub Releases (`provider: github`) configured at build time.
29- Repository slug source:
30 - `T3CODE_DESKTOP_UPDATE_REPOSITORY` (format `owner/repo`), if set.
31 - otherwise `GITHUB_REPOSITORY` from GitHub Actions.
32- Temporary private-repo auth workaround:
33 - set `T3CODE_DESKTOP_UPDATE_GITHUB_TOKEN` (or `GH_TOKEN`) in the desktop app runtime environment.
34 - the app forwards it as an `Authorization: Bearer <token>` request header for updater HTTP calls.
35- Required release assets for updater:
36 - platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
37 - `latest*.yml` metadata
38 - `*.blockmap` files (used for differential downloads)
39- macOS metadata note:
40 - `electron-updater` reads `latest-mac.yml` for both Intel and Apple Silicon.
41 - The workflow merges the per-arch mac manifests into one `latest-mac.yml` before publishing the GitHub Release.
42​
43## 0) npm OIDC trusted publishing setup (CLI)
44​
45The workflow publishes the CLI with `bun publish` from `apps/server` after bumping
46the package version to the release tag version.
47​
48Checklist:
49​
501. Confirm npm org/user owns package `t3` (or rename package first if needed).
512. In npm package settings, configure Trusted Publisher:
52 - Provider: GitHub Actions
53 - Repository: this repo
54 - Workflow file: `.github/workflows/release.yml`
55 - Environment (if used): match your npm trusted publishing config
563. Ensure npm account and org policies allow trusted publishing for the package.
574. Create release tag `vX.Y.Z` and push; workflow will:
58 - set `apps/server/package.json` version to `X.Y.Z`
59 - build web + server
60 - run `bun publish --access public`
61​
62## 1) Dry-run release without signing
63​
64Use this first to validate the release pipeline.
65​
661. Confirm no signing secrets are required for this test.
672. Create a test tag:
68 - `git tag v0.0.0-test.1`
69 - `git push origin v0.0.0-test.1`
703. Wait for `.github/workflows/release.yml` to finish.
714. Verify the GitHub Release contains all platform artifacts.
725. Download each artifact and sanity-check installation on each OS.
73​
74## 2) Apple signing + notarization setup (macOS)
75​
76Required secrets used by the workflow:
77​
78- `CSC_LINK`
79- `CSC_KEY_PASSWORD`
80- `APPLE_API_KEY`
81- `APPLE_API_KEY_ID`
82- `APPLE_API_ISSUER`
83​
84Checklist:
85​
861. Apple Developer account access:
87 - Team has rights to create Developer ID certificates.
882. Create `Developer ID Application` certificate.
893. Export certificate + private key as `.p12` from Keychain.
904. Base64-encode the `.p12` and store as `CSC_LINK`.
915. Store the `.p12` export password as `CSC_KEY_PASSWORD`.
926. In App Store Connect, create an API key (Team key).
937. Add API key values:
94 - `APPLE_API_KEY`: contents of the downloaded `.p8`
95 - `APPLE_API_KEY_ID`: Key ID
96 - `APPLE_API_ISSUER`: Issuer ID
978. Re-run a tag release and confirm macOS artifacts are signed/notarized.
98​
99Notes:
100​
101- `APPLE_API_KEY` is stored as raw key text in secrets.
102- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
103​
104## 3) Azure Trusted Signing setup (Windows)
105​
106Required secrets used by the workflow:
107​
108- `AZURE_TENANT_ID`
109- `AZURE_CLIENT_ID`
110- `AZURE_CLIENT_SECRET`
111- `AZURE_TRUSTED_SIGNING_ENDPOINT`
112- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
113- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
114- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
115​
116Checklist:
117​
1181. Create Azure Trusted Signing account and certificate profile.
1192. Record ATS values:
120 - Endpoint
121 - Account name
122 - Certificate profile name
123 - Publisher name
1243. Create/choose an Entra app registration (service principal).
1254. Grant service principal permissions required by Trusted Signing.
1265. Create a client secret for the service principal.
1276. Add Azure secrets listed above in GitHub Actions secrets.
1287. Re-run a tag release and confirm Windows installer is signed.
129​
130## 4) Ongoing release checklist
131​
1321. Ensure `main` is green in CI.
1332. Bump app version as needed.
1343. Create release tag: `vX.Y.Z`.
1354. Push tag.
1365. Verify workflow steps:
137 - preflight passes
138 - all matrix builds pass
139 - release job uploads expected files
1406. Smoke test downloaded artifacts.
141​
142## 5) Troubleshooting
143​
144- macOS build unsigned when expected signed:
145 - Check all Apple secrets are populated and non-empty.
146- Windows build unsigned when expected signed:
147 - Check all Azure ATS and auth secrets are populated and non-empty.
148- Build fails with signing error:
149 - Retry with secrets removed to confirm unsigned path still works.
150 - Re-check certificate/profile names and tenant/client credentials.