@devries-cameron20 / t3code-1 / commits / 333f7a6f6e
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

ci(release): preview releases run from any branch (#27828)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Nov 1, 2026 at 21:37 UTC 333f7a6f6e6b074ba28aca662ff4052c99280d15
2 files changed +22 -4
.github/workflows/release.yml
+15 -1
@@ -395,8 +395,12 @@ jobs:
395 (github.event_name != 'schedule' || needs.resolve_commit.outputs.has_changes == 'true')
396 runs-on: blacksmith-8vcpu-ubuntu-2404
397 timeout-minutes: 5
398 + # Previews build any branch, but production admits only main and v* tags.
399 + # The empty name runs previews with no environment, so their Clerk and relay
400 + # ids come from .env.example. Everything else matches nightly: the tracing
401 + # read below needs only repository-level Cloudflare credentials.
402 environment:
399 - name: production
403 + name: ${{ inputs.channel != 'preview' && 'production' || '' }}
404 outputs:
405 clerk_publishable_key: ${{ steps.public_config.outputs.clerk_publishable_key }}
406 clerk_jwt_template: ${{ steps.public_config.outputs.clerk_jwt_template }}
@@ -462,9 +466,19 @@ jobs:
466 - id: public_config
467 name: Resolve production relay public config
468 shell: bash
469 + env:
470 + PREVIEW: ${{ inputs.channel == 'preview' }}
471 run: |
472 set -euo pipefail
473
474 + if [[ "$PREVIEW" == "true" ]]; then
475 + env_example() { sed -n "s|^T3CODE_$1=||p" .env.example; }
476 + CLERK_PUBLISHABLE_KEY="$(env_example CLERK_PUBLISHABLE_KEY)"
477 + CLERK_JWT_TEMPLATE="$(env_example CLERK_JWT_TEMPLATE)"
478 + CLERK_CLI_OAUTH_CLIENT_ID="$(env_example CLERK_CLI_OAUTH_CLIENT_ID)"
479 + RELAY_DOMAIN="$(sed -n 's|^T3CODE_RELAY_URL=https://||p' .env.example)"
480 + fi
481 +
482 relay_domain="${RELAY_DOMAIN:-}"
483 if [[ -z "$relay_domain" && -n "${RELAY_API_ZONE_NAME:-}" ]]; then
484 relay_domain="relay.$RELAY_API_ZONE_NAME"
docs/operations/release.md
+7 -3
@@ -106,9 +106,13 @@ The relay is a shared control plane versioned separately from client releases. S
106 client builds must point at the same relay so users see the same linked environments when switching
107 release channels.
108
109 -`.github/workflows/deploy-relay.yml` deploys Alchemy stage `prod` on every push to `main`. The
110 -release workflow reads the relay URL and Clerk client configuration from the existing `production`
111 -GitHub Actions environment before building desktop, CLI, or hosted web artifacts.
109 +`.github/workflows/deploy-relay.yml` deploys Alchemy stage `prod` on every push to `main`. Stable
110 +and nightly releases read the relay URL and Clerk client configuration from the existing
111 +`production` GitHub Actions environment before building desktop, CLI, or hosted web artifacts. That
112 +environment admits only `main` and `v*` tags, so preview releases, which may run from any branch,
113 +take the same public identifiers from `.env.example`; keep it in step with the `production` values.
114 +Every channel reads the relay client tracing config from Alchemy state with the repository-level
115 +`CLOUDFLARE_API_TOKEN`, so moving that token into `production` would break preview releases.
116
117 Required repository variables shared by relay deployments:
118