History

Alias stable releases to the router domain (#2636)

Julius Marminge committed 6 months ago

Commit e64c19f1 parent 6ab8f936 files · +41 −16Browse files

Showing the changes to .github (1 of 6 files). Show all

Unified · Split

.github/workflows/release.yml+10−0
@@ -625,6 +625,9 @@ jobs: · 624 unmodified lines
625625 router_url="${T3CODE_WEB_ROUTER_URL:-https://app.t3.codes}"
626626 latest_domain="${T3CODE_WEB_LATEST_DOMAIN:-latest.app.t3.codes}"
627627 nightly_domain="${T3CODE_WEB_NIGHTLY_DOMAIN:-nightly.app.t3.codes}"
628+ router_domain="${router_url#http://}"
629+ router_domain="${router_domain#https://}"
630+ router_domain="${router_domain%%/*}"
628631
629632 if [[ "${{ needs.preflight.outputs.release_channel }}" == "stable" ]]; then
630633 channel_domain="$latest_domain"
@@ -655,6 +658,13 @@ jobs: · 24 unmodified lines
655658 --token "$VERCEL_TOKEN" \
656659 "${vercel_scope_args[@]}"
657660
661+ if [[ "$channel_name" == "latest" && -n "$router_domain" && "$router_domain" != "$channel_domain" ]]; then
662+ echo "Aliasing $deployment_url to router domain $router_domain."
663+ bunx vercel@53.1.1 alias set "$deployment_url" "$router_domain" \
664+ --token "$VERCEL_TOKEN" \
665+ "${vercel_scope_args[@]}"
666+ fi
667+
658668 finalize:
659669 name: Finalize release
660670 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}