7.5 KiB
Release Runbook
Unified release workflow: .github/workflows/release.yml. Beta is a product label, not a release channel—channels remain stable and nightly (plus preview for maintainer test builds).
Channels and triggers
- Stable (
channel=stableonmain, or pushing avX.Y.Ztag): Manual dispatch promotes the latest published nightly commit (notmainHEAD) using its base version unless overridden. Pushing avX.Y.Ztag ships that exact commit. Finalization commits version bumps tomainusingRELEASE_APP_ID/RELEASE_APP_PRIVATE_KEY. - Nightly (scheduled every 30 min when new commits exist and >=6 h elapsed, or manual
channel=nightlyonmain): Publishes a GitHub prerelease,nightlydesktop updater channel,nightlynpm dist-tag, hostednightlyweb alias, and marketing site. Does not bump versions onmain.- Pause/resume automatic nightlies:
gh variable set PAUSE_NIGHTLY -b true -R pingdotgg/t3code/gh variable delete PAUSE_NIGHTLY -R pingdotgg/t3code.
- Pause/resume automatic nightlies:
- Preview (
channel=preview, any branch—default dispatch channel): Exercises build, signing, notarization, and smoke tests into a draft GitHub release and skips npm, web, AUR, and announcements. Never publish a preview draft or push a test tag—there is no dry-run tag path (any non-nightlyv*tag publishes stable), and published preview tags hide nightlies from the update feed. Rebase ontomainbefore dispatchingpreview. - PR macOS previews: Applying the
preview:maclabel triggers a two-workflow split (desktop-macos-preview.ymlbuilds the untrusted JS bundle;desktop-macos-preview-publish.ymlchecks author trust againstmain's.github/VOUCHED.td, packages/signs usingmain, and publishes to rollingdesktop-preview). One-shot per commit; label is removed automatically.
Critical release invariants
- Server self-update ordering: Connected servers update to the exact client version by downloading the GitHub Release CLI archive (or
npx t3@<version>). Keep the release graph order strictly:release(CLI archives +SHA256SUMS+ desktop installers) →publish_cli(t3npm launcher) →deploy_web(hosted channel alias). Never publish clients before the archives and npm launcher exist. - Standalone CLI archives & Node pin:
engines.nodein rootpackage.jsonmust stay exact (Node SEA builds reject mismatches). There is no macOS x64 CLI archive (SEA is unsupported there; x64 desktop uses Electron). - Smoke fixture:
scripts/fixtures/desktop-launchis intentionally an old SQLite snapshot to verify forward migrations on packaged builds—never regenerate it on schema changes. - Hosted web & marketing: Vercel Git auto-deployments stay disabled (
apps/{web,marketing}/vercel.ts). Releases build with--skip-domainand aliasapp.t3.codes/latest.app.t3.codes(stable) ornightly.app.t3.codes+ marketing (nightly) only after publication.
Update feed
Nightly installs check releases.atom (the 10 newest git tags), then the update-feed release's nightly.json pointer, then the GitHub API as fallback. Never delete the update-feed release.
- If
Check the update feedfails because stray/preview tags pushed the newest nightly out ofreleases.atom, delete the unneeded tags (git push origin :refs/tags/<tag>—converting a release to draft keeps its tag). - To pull a bad nightly: delete its release and tag, run
gh release delete-asset update-feed nightly.json(so installs fall back until the next tick rewrites it), and move npm'snightlydist-tag back withnpm dist-tag add t3@<last-good> nightly.
T3 Connect relay deployment
.github/workflows/deploy-relay.yml deploys Alchemy stage prod on every push to main. See infra/relay/README.md for required variables/secrets. Keep .env.example in sync with production public identifiers so preview builds work off non-main branches. After editing a secret/variable, manually run Deploy T3 Connect relay (with force unchecked).
Labeling a same-repo PR relay:preview deploys stage pr-<number> (cleaned up on unlabel/close).
Managed tunnel cleanup rollout
RELAY_TUNNEL_CLEANUP_MODE and RELAY_LEGACY_TUNNEL_CLEANUP_MODE accept off (default), dry-run, or enabled and take effect on the next relay deploy (without force). Monitor relay.managed_endpoint_reaper.sweep spans in Axiom. To stop cleanup during an incident, set the mode to off and redeploy the relay.
Mobile releases
- iOS TestFlight / App Store: Merges to
mainpublish compatible OTAs and build TestFlight prereleases (testflightprofile at3.0.0). To cut an App Store build, dispatch Mobile EAS Production (mode=build,profile=production,platform=ios, explicit version). Before shipping3.0.0to the App Store, advancebuild.testflight.env.T3CODE_MOBILE_VERSIONinapps/mobile/eas.jsonto the next unreleased major. - Android APK mirror:
.github/workflows/mobile-android-apk.ymlpolls Google Play Alpha hourly and mirrors new Play-signed universal APKs toandroid-beta-<build-number>prereleases (GOOGLE_PLAY_SERVICE_ACCOUNT_JSON). Nightlies attach the latest internal-testing APK when available.
Windows payload topology and update validation
Windows packages the bundled server and its unpacked native modules in resources/server.asar (+ server.asar.unpacked) and embeds the matching-architecture Linux CLI archive as resources/wsl-runtime.tar.gz + SHA-256 sidecar (passed via --wsl-runtime). Avoid whole-package smart unpacking (keeps unpacked file counts and NSIS differential blockmaps bounded). scripts/build-desktop-artifact.ts enforces all structural, native-load, and WSL archive checks at build time.
One-time credentials setup
npm OIDC trusted publishing
Configure t3 on npm with GitHub Actions Trusted Publishing for .github/workflows/release.yml (the workflow publishes only the t3 launcher tarball via npm publish --provenance). Set the publisher's environment to production, which publish_cli declares.
Apple signing and notarization (macOS)
- Secrets:
CSC_LINK(base64.p12),CSC_KEY_PASSWORD,APPLE_API_KEY(raw.p8),APPLE_API_KEY_ID,APPLE_API_ISSUER,MACOS_PROVISIONING_PROFILE(base64 profile forcom.t3tools.t3codewith Associated Domains). - Variables:
APPLE_TEAM_ID, optionalCLERK_PASSKEY_RP_DOMAINS. - The packager only enables passkey entitlements (
keychain-access-groups,com.apple.developer.web-browser.public-key-credential) present in the provisioning profile; regenerate and re-uploadMACOS_PROVISIONING_PROFILEafter Apple approves managed capabilities. Complete Clerk AASA setup per Connect setup.
Azure Trusted Signing (Windows)
Set secrets AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TRUSTED_SIGNING_ENDPOINT, AZURE_TRUSTED_SIGNING_ACCOUNT_NAME, AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME, and AZURE_TRUSTED_SIGNING_PUBLISHER_NAME with an Entra service principal granted Trusted Signing permissions.
Ongoing stable release checklist
- Verify the latest nightly (desktop launch,
npm view t3@<version> version, remote server update + DB migration smoke test). - Dispatch Release on
mainwithchannel=stable(leaveversionblank unless overriding the nightly's base version). - Confirm
Resolve release commitmatches the verified nightly, then verifyrelease→publish_cli→deploy_weball succeed. - Smoke-test the published artifacts.