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

release.yml

1,123 lines43.4 KB

1name: Release
2​
3on:
4 push:
5 tags:
6 - "v*.*.*"
7 - "!v*-nightly.*"
8 schedule:
9 - cron: "0 */3 * * *"
10 workflow_dispatch:
11 inputs:
12 channel:
13 description: "Release channel"
14 required: false
15 default: stable
16 type: choice
17 options:
18 - stable
19 - nightly
20 version:
21 description: "Release version (for example 1.2.3 or v1.2.3)"
22 required: false
23 type: string
24​
25permissions:
26 contents: read
27 id-token: none
28​
29jobs:
30 check_changes:
31 name: Check for changes since last nightly
32 if: github.event_name == 'schedule'
33 runs-on: blacksmith-8vcpu-ubuntu-2404
34 outputs:
35 has_changes: ${{ steps.check.outputs.has_changes }}
36 steps:
37 - name: Checkout
38 uses: actions/checkout@v6
39 with:
40 fetch-depth: 0
41 sparse-checkout: |
42 /*
43 !/.repos/
44 sparse-checkout-cone-mode: false
45​
46 - id: check
47 name: Compare HEAD to last nightly tag
48 run: |
49 last_nightly_tag=$(git tag --list 'v*-nightly.*' 'nightly-v*' --sort=-creatordate | head -n 1)
50 if [[ -z "$last_nightly_tag" ]]; then
51 echo "No previous nightly tag found. Proceeding with release."
52 echo "has_changes=true" >> "$GITHUB_OUTPUT"
53 exit 0
54 fi
55​
56 last_nightly_sha=$(git rev-parse "$last_nightly_tag^{commit}")
57 head_sha=$(git rev-parse HEAD)
58​
59 if [[ "$last_nightly_sha" == "$head_sha" ]]; then
60 echo "No changes on main since last nightly release ($last_nightly_tag). Skipping."
61 echo "has_changes=false" >> "$GITHUB_OUTPUT"
62 else
63 echo "Changes detected on main since $last_nightly_tag ($last_nightly_sha → $head_sha). Proceeding."
64 echo "has_changes=true" >> "$GITHUB_OUTPUT"
65 fi
66​
67 preflight:
68 name: Preflight
69 needs: [check_changes]
70 if: |
71 !failure() && !cancelled() &&
72 (github.event_name != 'schedule' || needs.check_changes.outputs.has_changes == 'true')
73 runs-on: blacksmith-8vcpu-ubuntu-2404
74 timeout-minutes: 10
75 outputs:
76 release_channel: ${{ steps.release_meta.outputs.release_channel }}
77 version: ${{ steps.release_meta.outputs.version }}
78 tag: ${{ steps.release_meta.outputs.tag }}
79 release_name: ${{ steps.release_meta.outputs.name }}
80 short_sha: ${{ steps.release_meta.outputs.short_sha }}
81 previous_tag: ${{ steps.previous_tag.outputs.previous_tag }}
82 cli_dist_tag: ${{ steps.release_meta.outputs.cli_dist_tag }}
83 is_prerelease: ${{ steps.release_meta.outputs.is_prerelease }}
84 make_latest: ${{ steps.release_meta.outputs.make_latest }}
85 ref: ${{ github.sha }}
86 steps:
87 - name: Checkout
88 uses: actions/checkout@v6
89 with:
90 fetch-depth: 0
91 sparse-checkout: |
92 /*
93 !/.repos/
94 sparse-checkout-cone-mode: false
95​
96 - name: Setup Vite+
97 uses: voidzero-dev/setup-vp@v1
98 with:
99 node-version-file: package.json
100 cache: true
101 run-install: true
102​
103 - name: Ensure Electron runtime is installed
104 run: vp run --filter @t3tools/desktop ensure:electron
105​
106 - id: release_meta
107 name: Resolve release version
108 shell: bash
109 env:
110 DISPATCH_CHANNEL: ${{ github.event.inputs.channel }}
111 DISPATCH_VERSION: ${{ github.event.inputs.version }}
112 NIGHTLY_DATE: ${{ github.run_started_at }}
113 NIGHTLY_SHA: ${{ github.sha }}
114 NIGHTLY_RUN_NUMBER: ${{ github.run_number }}
115 run: |
116 if [[ "${GITHUB_EVENT_NAME}" == "schedule" || ( "${GITHUB_EVENT_NAME}" == "workflow_dispatch" && "${DISPATCH_CHANNEL:-stable}" == "nightly" ) ]]; then
117 nightly_date="$(date -u -d "$NIGHTLY_DATE" +%Y%m%d)"
118​
119 node scripts/resolve-nightly-release.ts \
120 --date "$nightly_date" \
121 --run-number "$NIGHTLY_RUN_NUMBER" \
122 --sha "$NIGHTLY_SHA" \
123 --github-output
124​
125 echo "release_channel=nightly" >> "$GITHUB_OUTPUT"
126 echo "cli_dist_tag=nightly" >> "$GITHUB_OUTPUT"
127 echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
128 echo "make_latest=false" >> "$GITHUB_OUTPUT"
129 else
130 if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
131 raw="${DISPATCH_VERSION}"
132 if [[ -z "$raw" ]]; then
133 echo "workflow_dispatch stable releases require the version input." >&2
134 exit 1
135 fi
136 else
137 raw="${GITHUB_REF_NAME}"
138 fi
139​
140 version="${raw#v}"
141 if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then
142 echo "Invalid release version: $raw" >&2
143 exit 1
144 fi
145​
146 echo "release_channel=stable" >> "$GITHUB_OUTPUT"
147 echo "version=$version" >> "$GITHUB_OUTPUT"
148 echo "tag=v$version" >> "$GITHUB_OUTPUT"
149 echo "name=T3 Code v$version" >> "$GITHUB_OUTPUT"
150 echo "cli_dist_tag=latest" >> "$GITHUB_OUTPUT"
151 if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
152 echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
153 echo "make_latest=true" >> "$GITHUB_OUTPUT"
154 else
155 echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
156 echo "make_latest=false" >> "$GITHUB_OUTPUT"
157 fi
158 fi
159​
160 - name: Check
161 run: vp check
162​
163 - name: Typecheck
164 run: vp run typecheck
165​
166 - name: Test
167 run: vp run test
168​
169 - id: previous_tag
170 name: Resolve previous release tag
171 run: |
172 node scripts/resolve-previous-release-tag.ts \
173 --channel "${{ steps.release_meta.outputs.release_channel }}" \
174 --current-tag "${{ steps.release_meta.outputs.tag }}" \
175 --github-output
176​
177 relay_public_config:
178 name: Resolve T3 Connect public config
179 needs: preflight
180 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
181 runs-on: blacksmith-8vcpu-ubuntu-2404
182 timeout-minutes: 5
183 environment:
184 name: production
185 outputs:
186 clerk_publishable_key: ${{ steps.public_config.outputs.clerk_publishable_key }}
187 clerk_jwt_template: ${{ steps.public_config.outputs.clerk_jwt_template }}
188 clerk_cli_oauth_client_id: ${{ steps.public_config.outputs.clerk_cli_oauth_client_id }}
189 relay_url: ${{ steps.public_config.outputs.relay_url }}
190 env:
191 CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
192 CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
193 RELAY_DOMAIN: ${{ vars.RELAY_DOMAIN }}
194 RELAY_API_ZONE_NAME: ${{ vars.RELAY_API_ZONE_NAME }}
195 CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
196 CLERK_JWT_TEMPLATE: ${{ vars.CLERK_JWT_TEMPLATE }}
197 CLERK_CLI_OAUTH_CLIENT_ID: ${{ vars.CLERK_CLI_OAUTH_CLIENT_ID }}
198 steps:
199 - name: Checkout
200 uses: actions/checkout@v6
201 with:
202 ref: ${{ needs.preflight.outputs.ref }}
203 sparse-checkout: |
204 /*
205 !/.repos/
206 sparse-checkout-cone-mode: false
207​
208 - name: Setup Vite+
209 uses: voidzero-dev/setup-vp@v1
210 with:
211 node-version-file: package.json
212 cache: true
213 run-install: |
214 args:
215 - --filter=t3code-relay...
216​
217 - id: relay_state
218 name: Read production relay tracing config
219 shell: bash
220 run: |
221 vp run --filter t3code-relay deploy \
222 --stage prod \
223 --read-state \
224 --github-output \
225 --github-env-file "$RUNNER_TEMP/relay-client-tracing.env"
226​
227 - name: Upload relay client tracing config
228 uses: actions/upload-artifact@v7
229 with:
230 name: relay-client-tracing-config
231 path: ${{ runner.temp }}/relay-client-tracing.env
232 if-no-files-found: error
233 retention-days: 1
234​
235 - id: public_config
236 name: Resolve production relay public config
237 shell: bash
238 run: |
239 set -euo pipefail
240​
241 relay_domain="${RELAY_DOMAIN:-}"
242 if [[ -z "$relay_domain" && -n "${RELAY_API_ZONE_NAME:-}" ]]; then
243 relay_domain="relay.$RELAY_API_ZONE_NAME"
244 fi
245 required=(
246 relay_domain
247 CLERK_PUBLISHABLE_KEY
248 CLERK_JWT_TEMPLATE
249 CLERK_CLI_OAUTH_CLIENT_ID
250 )
251 missing=()
252 for name in "${required[@]}"; do
253 if [[ -z "${!name:-}" ]]; then
254 missing+=("$name")
255 fi
256 done
257 if (( ${#missing[@]} > 0 )); then
258 printf 'Missing required relay deployment configuration: %s\n' "${missing[*]}" >&2
259 exit 1
260 fi
261​
262 echo "clerk_publishable_key=$CLERK_PUBLISHABLE_KEY" >> "$GITHUB_OUTPUT"
263 echo "clerk_jwt_template=$CLERK_JWT_TEMPLATE" >> "$GITHUB_OUTPUT"
264 echo "clerk_cli_oauth_client_id=$CLERK_CLI_OAUTH_CLIENT_ID" >> "$GITHUB_OUTPUT"
265 echo "relay_url=https://$relay_domain" >> "$GITHUB_OUTPUT"
266​
267 # node-pty publishes no Linux prebuilt and the WSL backend runs under the
268 # distro's own (Linux) Node, which can't load the Windows/Electron binary. We
269 # build the Linux pty.node here, on Linux, and hand it to the Windows packaging
270 # job — the Windows artifact then ships a ready WSL backend binary with no
271 # cross-compiling and no first-launch compiler/node-gyp/network on the user's
272 # machine. node-pty is N-API, so one binary works across all WSL Node versions.
273 build_wsl_node_pty:
274 name: Build WSL node-pty (linux-x64)
275 needs: [preflight]
276 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
277 runs-on: blacksmith-8vcpu-ubuntu-2404
278 timeout-minutes: 15
279 steps:
280 - name: Checkout
281 uses: actions/checkout@v6
282 with:
283 ref: ${{ needs.preflight.outputs.ref }}
284 sparse-checkout: |
285 /*
286 !/.repos/
287 sparse-checkout-cone-mode: false
288​
289 - name: Setup Vite+
290 uses: voidzero-dev/setup-vp@v1
291 with:
292 node-version-file: package.json
293 cache: true
294 run-install: |
295 args:
296 - --filter=t3...
297​
298 - name: Build node-pty linux-x64 prebuild
299 shell: bash
300 run: |
301 set -euo pipefail
302 # Resolve node-pty from apps/server (where it's a dependency) and build
303 # its native binary from source for Linux. node-addon-api resolves from
304 # node-pty's own dependency tree, so node-gyp has everything it needs.
305 pty_pkg="$(node -e "console.log(require.resolve('node-pty/package.json', { paths: ['$GITHUB_WORKSPACE/apps/server'] }))")"
306 pty_dir="$(dirname "$pty_pkg")"
307 ( cd "$pty_dir" && npx --yes node-gyp rebuild )
308 mkdir -p wsl-prebuild
309 cp "$pty_dir/build/Release/pty.node" wsl-prebuild/pty.node
310 file wsl-prebuild/pty.node
311​
312 - name: Upload node-pty linux-x64 prebuild
313 uses: actions/upload-artifact@v7
314 with:
315 name: wsl-node-pty-x64
316 path: wsl-prebuild/pty.node
317 if-no-files-found: error
318​
319 build:
320 name: Build ${{ matrix.label }}
321 # build_wsl_node_pty stays in `needs` so it runs first and its artifact is
322 # available to download, but only the Windows matrix entry consumes it. We
323 # therefore gate the job on preflight + relay (must succeed) WITHOUT requiring
324 # build_wsl_node_pty, so a failed Linux prebuild doesn't skip the macOS/Linux
325 # builds. `!cancelled()` (not `!failure()`) lets the job run even when
326 # build_wsl_node_pty failed; the Windows-only download step below then fails
327 # that single platform if the prebuild is missing.
328 needs: [preflight, relay_public_config, build_wsl_node_pty]
329 if: ${{ !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' }}
330 runs-on: ${{ matrix.runner }}
331 timeout-minutes: 30
332 env:
333 T3CODE_CLERK_PUBLISHABLE_KEY: ${{ needs.relay_public_config.outputs.clerk_publishable_key }}
334 T3CODE_CLERK_JWT_TEMPLATE: ${{ needs.relay_public_config.outputs.clerk_jwt_template }}
335 T3CODE_CLERK_CLI_OAUTH_CLIENT_ID: ${{ needs.relay_public_config.outputs.clerk_cli_oauth_client_id }}
336 T3CODE_RELAY_URL: ${{ needs.relay_public_config.outputs.relay_url }}
337 strategy:
338 fail-fast: false
339 matrix:
340 include:
341 - label: macOS arm64
342 runner: blacksmith-12vcpu-macos-26
343 platform: mac
344 target: dmg
345 arch: arm64
346 rust_target: aarch64-apple-darwin
347 resource_key: darwin-arm64
348 - label: macOS x64
349 runner: blacksmith-12vcpu-macos-26
350 platform: mac
351 target: dmg
352 arch: x64
353 rust_target: x86_64-apple-darwin
354 resource_key: darwin-x64
355 - label: Linux x64
356 runner: blacksmith-32vcpu-ubuntu-2404
357 platform: linux
358 target: AppImage
359 arch: x64
360 rust_target: x86_64-unknown-linux-gnu
361 resource_key: linux-x64
362 - label: Windows x64
363 runner: blacksmith-32vcpu-windows-2025
364 platform: win
365 target: nsis
366 arch: x64
367 rust_target: x86_64-pc-windows-msvc
368 resource_key: win32-x64
369 # - label: Windows arm64
370 # runner: windows-11-arm
371 # platform: win
372 # target: nsis
373 # arch: arm64
374 steps:
375 - name: Checkout
376 uses: actions/checkout@v6
377 with:
378 ref: ${{ needs.preflight.outputs.ref }}
379 sparse-checkout: |
380 /*
381 !/.repos/
382 sparse-checkout-cone-mode: false
383​
384 - name: Setup Vite+
385 uses: voidzero-dev/setup-vp@v1
386 with:
387 node-version-file: package.json
388 cache: true
389 run-install: |
390 args:
391 - --filter=@t3tools/desktop...
392 - --filter=t3...
393 - --filter=@t3tools/scripts...
394​
395 - name: Setup Rust
396 uses: dtolnay/rust-toolchain@stable
397 with:
398 targets: ${{ matrix.rust_target }}
399​
400 - name: Download relay client tracing config
401 uses: actions/download-artifact@v8
402 with:
403 name: relay-client-tracing-config
404 path: ${{ runner.temp }}/relay-client-tracing
405​
406 - name: Load relay client tracing config
407 shell: bash
408 run: |
409 config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env"
410 tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")"
411 echo "::add-mask::$tracing_token"
412 cat "$config_path" >> "$GITHUB_ENV"
413​
414 - name: Align package versions to release version
415 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
416​
417 - name: Download WSL node-pty prebuild
418 if: matrix.platform == 'win'
419 uses: actions/download-artifact@v7
420 with:
421 name: wsl-node-pty-x64
422 path: wsl-prebuild
423​
424 - name: Install Spectre-mitigated MSVC libs
425 if: matrix.platform == 'win'
426 shell: pwsh
427 run: |
428 $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
429 $installPath = & $vswhere -products * -latest -property installationPath
430 $setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
431 $proc = Start-Process -FilePath $setupExe `
432 -ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
433 "Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" `
434 -Wait -PassThru -NoNewWindow
435 if ($null -eq $proc -or $proc.ExitCode -ne 0) {
436 $code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
437 Write-Error "Visual Studio Installer failed with exit code $code"
438 exit $code
439 }
440​
441 - name: Install ImageMagick
442 if: matrix.platform == 'linux'
443 shell: bash
444 run: |
445 if ! command -v magick >/dev/null 2>&1 && ! command -v convert >/dev/null 2>&1; then
446 sudo apt-get update
447 sudo apt-get install -y imagemagick
448 fi
449​
450 if command -v magick >/dev/null 2>&1; then
451 magick -version
452 else
453 convert -version
454 fi
455​
456 - name: Prepare Azure Trusted Signing
457 if: matrix.platform == 'win'
458 shell: pwsh
459 env:
460 AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
461 AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
462 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
463 AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
464 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
465 AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
466 AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
467 run: |
468 $ErrorActionPreference = "Stop"
469​
470 $requiredSecrets = @(
471 $env:AZURE_TENANT_ID,
472 $env:AZURE_CLIENT_ID,
473 $env:AZURE_CLIENT_SECRET,
474 $env:AZURE_TRUSTED_SIGNING_ENDPOINT,
475 $env:AZURE_TRUSTED_SIGNING_ACCOUNT_NAME,
476 $env:AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME,
477 $env:AZURE_TRUSTED_SIGNING_PUBLISHER_NAME
478 )
479 if ($requiredSecrets | Where-Object { [string]::IsNullOrWhiteSpace($_) }) {
480 Write-Host "Azure Trusted Signing disabled; skipping TrustedSigning module preparation."
481 exit 0
482 }
483​
484 try {
485 Install-PackageProvider `
486 -Name NuGet `
487 -MinimumVersion 2.8.5.201 `
488 -Force `
489 -Scope CurrentUser `
490 -ErrorAction Stop
491 } catch {
492 Write-Warning "Could not bootstrap NuGet package provider. Continuing because the runner may already have a usable provider. $($_.Exception.Message)"
493 }
494​
495 Install-Module `
496 -Name TrustedSigning `
497 -MinimumVersion 0.5.0 `
498 -Force `
499 -AllowClobber `
500 -Repository PSGallery `
501 -Scope CurrentUser `
502 -ErrorAction Stop
503​
504 Import-Module TrustedSigning -MinimumVersion 0.5.0 -Force
505 Get-Command Invoke-TrustedSigning -ErrorAction Stop
506​
507 $moduleRoots = @(
508 [System.IO.Path]::Combine([Environment]::GetFolderPath("MyDocuments"), "PowerShell", "Modules"),
509 [System.IO.Path]::Combine([Environment]::GetFolderPath("MyDocuments"), "WindowsPowerShell", "Modules"),
510 [System.IO.Path]::Combine($env:ProgramFiles, "PowerShell", "Modules"),
511 [System.IO.Path]::Combine($env:ProgramFiles, "WindowsPowerShell", "Modules")
512 )
513 $modulePathEntries = @($moduleRoots + ($env:PSModulePath -split ";")) |
514 Where-Object { $_ -and (Test-Path $_) } |
515 Select-Object -Unique
516 "PSModulePath=$($modulePathEntries -join ';')" >> $env:GITHUB_ENV
517​
518 - name: Build desktop artifact
519 shell: bash
520 env:
521 CSC_LINK: ${{ secrets.CSC_LINK }}
522 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
523 APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
524 APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
525 APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
526 APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
527 MACOS_PROVISIONING_PROFILE: ${{ secrets.MACOS_PROVISIONING_PROFILE }}
528 T3CODE_CLERK_PASSKEY_RP_DOMAINS: ${{ vars.CLERK_PASSKEY_RP_DOMAINS }}
529 AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
530 AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
531 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
532 AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
533 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
534 AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
535 AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
536 run: |
537 args=(
538 --platform "${{ matrix.platform }}"
539 --target "${{ matrix.target }}"
540 --arch "${{ matrix.arch }}"
541 --build-version "${{ needs.preflight.outputs.version }}"
542 --verbose
543 )
544​
545 has_all() {
546 for value in "$@"; do
547 if [[ -z "$value" ]]; then
548 return 1
549 fi
550 done
551 return 0
552 }
553​
554 if [[ "${{ matrix.platform }}" == "mac" ]]; then
555 if has_all "$CSC_LINK" "$CSC_KEY_PASSWORD" "$APPLE_API_KEY" "$APPLE_API_KEY_ID" "$APPLE_API_ISSUER"; then
556 if ! has_all "$APPLE_TEAM_ID" "$MACOS_PROVISIONING_PROFILE"; then
557 echo "macOS signing is configured, but APPLE_TEAM_ID or MACOS_PROVISIONING_PROFILE is missing." >&2
558 exit 1
559 fi
560​
561 key_path="$RUNNER_TEMP/AuthKey_${APPLE_API_KEY_ID}.p8"
562 printf '%s' "$APPLE_API_KEY" > "$key_path"
563 export APPLE_API_KEY="$key_path"
564​
565 profile_path="$RUNNER_TEMP/t3code.provisionprofile"
566 printf '%s' "$MACOS_PROVISIONING_PROFILE" | base64 -D > "$profile_path"
567 security cms -D -i "$profile_path" >/dev/null
568 export T3CODE_APPLE_TEAM_ID="$APPLE_TEAM_ID"
569 export T3CODE_MACOS_PROVISIONING_PROFILE="$profile_path"
570​
571 echo "macOS signing enabled."
572 args+=(--signed)
573 else
574 echo "macOS signing disabled (missing one or more Apple signing secrets)."
575 fi
576 elif [[ "${{ matrix.platform }}" == "win" ]]; then
577 # Bundle the Linux node-pty binary built by the build_wsl_node_pty job
578 # so the packaged WSL backend ships a ready binary (no first-launch
579 # compile). Required for a working WSL backend on Windows.
580 args+=(--wsl-prebuild "$GITHUB_WORKSPACE/wsl-prebuild/pty.node")
581 if has_all \
582 "$AZURE_TENANT_ID" \
583 "$AZURE_CLIENT_ID" \
584 "$AZURE_CLIENT_SECRET" \
585 "$AZURE_TRUSTED_SIGNING_ENDPOINT" \
586 "$AZURE_TRUSTED_SIGNING_ACCOUNT_NAME" \
587 "$AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME" \
588 "$AZURE_TRUSTED_SIGNING_PUBLISHER_NAME"; then
589 echo "Windows signing enabled (Azure Trusted Signing)."
590 args+=(--signed)
591 else
592 echo "Windows signing disabled (missing one or more Azure Trusted Signing secrets)."
593 fi
594 else
595 echo "Signing disabled for ${{ matrix.platform }}."
596 fi
597​
598 vp run dist:desktop:artifact "${args[@]}"
599​
600 - name: Collect release assets
601 shell: bash
602 run: |
603 set -euo pipefail
604 mkdir -p release-publish
605​
606 shopt -s nullglob
607 for pattern in \
608 "release/*.dmg" \
609 "release/*.zip" \
610 "release/*.AppImage" \
611 "release/*.deb" \
612 "release/*.exe" \
613 "release/*.blockmap" \
614 "release/*.yml"; do
615 for file in $pattern; do
616 cp "$file" release-publish/
617 done
618 done
619​
620 if [[ "${{ matrix.platform }}" == "mac" && "${{ matrix.arch }}" != "arm64" ]]; then
621 shopt -s nullglob
622 for manifest in release-publish/*-mac.yml; do
623 mv "$manifest" "${manifest%.yml}-${{ matrix.arch }}.yml"
624 done
625 fi
626​
627 # Enable if Windows arm64 builds are enabled.
628 # Windows updater metadata is channel-specific (for example
629 # "latest.yml" or "nightly.yml"). Suffix each per-arch copy so the
630 # release job can merge matching arm64/x64 manifests back into one
631 # canonical manifest per channel.
632 # if [[ "${{ matrix.platform }}" == "win" ]]; then
633 # shopt -s nullglob
634 # for manifest in release-publish/*.yml; do
635 # mv "$manifest" "${manifest%.yml}-win-${{ matrix.arch }}.yml"
636 # done
637 # fi
638​
639 - name: Collect resource monitor
640 shell: bash
641 run: |
642 set -euo pipefail
643 binary_name="t3-resource-monitor"
644 if [[ "${{ matrix.platform }}" == "win" ]]; then
645 binary_name="${binary_name}.exe"
646 fi
647 source_path="native/resource-monitor/target/${{ matrix.rust_target }}/release/${binary_name}"
648 target_dir="resource-monitor-publish/${{ matrix.resource_key }}"
649 mkdir -p "$target_dir"
650 cp "$source_path" "$target_dir/$binary_name"
651​
652 - name: Upload build artifacts
653 uses: actions/upload-artifact@v7
654 with:
655 name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
656 path: release-publish/*
657 if-no-files-found: error
658​
659 - name: Upload resource monitor
660 uses: actions/upload-artifact@v7
661 with:
662 name: resource-monitor-${{ matrix.resource_key }}
663 path: resource-monitor-publish/${{ matrix.resource_key }}/*
664 if-no-files-found: error
665​
666 publish_cli:
667 name: Publish CLI to npm
668 needs: [preflight, relay_public_config, build]
669 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.build.result == 'success' }}
670 runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
671 timeout-minutes: 10
672 permissions:
673 contents: read
674 id-token: write
675 env:
676 T3CODE_CLERK_PUBLISHABLE_KEY: ${{ needs.relay_public_config.outputs.clerk_publishable_key }}
677 T3CODE_CLERK_JWT_TEMPLATE: ${{ needs.relay_public_config.outputs.clerk_jwt_template }}
678 T3CODE_CLERK_CLI_OAUTH_CLIENT_ID: ${{ needs.relay_public_config.outputs.clerk_cli_oauth_client_id }}
679 T3CODE_RELAY_URL: ${{ needs.relay_public_config.outputs.relay_url }}
680 steps:
681 - name: Checkout
682 uses: actions/checkout@v6
683 with:
684 ref: ${{ needs.preflight.outputs.ref }}
685 sparse-checkout: |
686 /*
687 !/.repos/
688 sparse-checkout-cone-mode: false
689​
690 - name: Setup Vite+
691 uses: voidzero-dev/setup-vp@v1
692 with:
693 node-version-file: package.json
694 cache: true
695 run-install: |
696 args:
697 - --filter=t3...
698 - --filter=@t3tools/web...
699 - --filter=@t3tools/scripts...
700​
701 - name: Download relay client tracing config
702 uses: actions/download-artifact@v8
703 with:
704 name: relay-client-tracing-config
705 path: ${{ runner.temp }}/relay-client-tracing
706​
707 - name: Load relay client tracing config
708 shell: bash
709 run: |
710 config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env"
711 tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")"
712 echo "::add-mask::$tracing_token"
713 cat "$config_path" >> "$GITHUB_ENV"
714​
715 - name: Align package versions to release version
716 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
717​
718 - name: Build web package
719 run: vp run --filter @t3tools/web build
720​
721 - name: Build CLI package
722 run: vp run --filter t3 build
723​
724 - name: Download resource monitors
725 uses: actions/download-artifact@v8
726 with:
727 pattern: resource-monitor-*
728 path: ${{ runner.temp }}/resource-monitors
729​
730 - name: Bundle resource monitors into CLI package
731 shell: bash
732 run: |
733 set -euo pipefail
734 for artifact_dir in "$RUNNER_TEMP"/resource-monitors/resource-monitor-*; do
735 resource_key="${artifact_dir##*/resource-monitor-}"
736 target_dir="apps/server/dist/resource-monitor/${resource_key}"
737 mkdir -p "$target_dir"
738 cp "$artifact_dir"/t3-resource-monitor* "$target_dir/"
739 chmod +x "$target_dir"/t3-resource-monitor 2>/dev/null || true
740 done
741​
742 - name: Publish CLI package
743 run: node apps/server/scripts/cli.ts publish --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --app-version "${{ needs.preflight.outputs.version }}" --verbose
744​
745 release:
746 name: Publish GitHub Release
747 needs: [preflight, build, publish_cli]
748 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.build.result == 'success' && needs.publish_cli.result == 'success' }}
749 runs-on: blacksmith-8vcpu-ubuntu-2404
750 timeout-minutes: 10
751 steps:
752 - id: app_token
753 name: Mint release app token
754 uses: actions/create-github-app-token@v2
755 with:
756 app-id: ${{ secrets.RELEASE_APP_ID }}
757 private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
758 owner: ${{ github.repository_owner }}
759​
760 - name: Checkout
761 uses: actions/checkout@v6
762 with:
763 ref: ${{ needs.preflight.outputs.ref }}
764 sparse-checkout: |
765 /*
766 !/.repos/
767 sparse-checkout-cone-mode: false
768​
769 - name: Setup Vite+
770 uses: voidzero-dev/setup-vp@v1
771 with:
772 node-version-file: package.json
773 cache: true
774 run-install: |
775 args:
776 - --filter=@t3tools/scripts...
777​
778 - name: Download all desktop artifacts
779 uses: actions/download-artifact@v8
780 with:
781 pattern: desktop-*
782 merge-multiple: true
783 path: release-assets
784​
785 - name: Merge macOS updater manifests
786 run: |
787 shopt -s nullglob
788 for x64_manifest in release-assets/*-mac-x64.yml; do
789 arm64_manifest="${x64_manifest%-x64.yml}.yml"
790 if [[ -f "$arm64_manifest" ]]; then
791 node scripts/merge-update-manifests.ts --platform mac "$arm64_manifest" "$x64_manifest"
792 rm -f "$x64_manifest"
793 fi
794 done
795​
796 # - name: Merge Windows updater manifests
797 # run: |
798 # shopt -s nullglob
799 # found_windows_manifest=false
800 # for x64_manifest in release-assets/*-win-x64.yml; do
801 # if [[ "$(basename "$x64_manifest")" == builder-debug-* ]]; then
802 # continue
803 # fi
804​
805 # arm64_manifest="${x64_manifest/-x64.yml/-arm64.yml}"
806 # output_manifest="${x64_manifest/-win-x64.yml/.yml}"
807 # if [[ ! -f "$arm64_manifest" ]]; then
808 # echo "Missing matching arm64 Windows manifest for $x64_manifest" >&2
809 # exit 1
810 # fi
811​
812 # found_windows_manifest=true
813 # node scripts/merge-update-manifests.ts --platform win \
814 # "$arm64_manifest" \
815 # "$x64_manifest" \
816 # "$output_manifest"
817 # rm -f "$arm64_manifest" "$x64_manifest"
818 # done
819​
820 # if [[ "$found_windows_manifest" != true ]]; then
821 # echo "No Windows updater manifests found to merge." >&2
822 # exit 1
823 # fi
824​
825 - name: Publish release
826 if: needs.preflight.outputs.previous_tag != ''
827 uses: softprops/action-gh-release@v2
828 with:
829 tag_name: ${{ needs.preflight.outputs.tag }}
830 target_commitish: ${{ needs.preflight.outputs.ref }}
831 name: ${{ needs.preflight.outputs.release_name }}
832 generate_release_notes: true
833 previous_tag: ${{ needs.preflight.outputs.previous_tag }}
834 prerelease: ${{ needs.preflight.outputs.is_prerelease }}
835 make_latest: ${{ needs.preflight.outputs.make_latest }}
836 files: |
837 release-assets/*.dmg
838 release-assets/*.zip
839 release-assets/*.AppImage
840 release-assets/*.deb
841 release-assets/*.exe
842 release-assets/*.blockmap
843 release-assets/*.yml
844 fail_on_unmatched_files: true
845 token: ${{ steps.app_token.outputs.token }}
846​
847 - name: Publish first release
848 if: needs.preflight.outputs.previous_tag == ''
849 uses: softprops/action-gh-release@v2
850 with:
851 tag_name: ${{ needs.preflight.outputs.tag }}
852 target_commitish: ${{ needs.preflight.outputs.ref }}
853 name: ${{ needs.preflight.outputs.release_name }}
854 generate_release_notes: true
855 prerelease: ${{ needs.preflight.outputs.is_prerelease }}
856 make_latest: ${{ needs.preflight.outputs.make_latest }}
857 files: |
858 release-assets/*.dmg
859 release-assets/*.zip
860 release-assets/*.AppImage
861 release-assets/*.deb
862 release-assets/*.exe
863 release-assets/*.blockmap
864 release-assets/*.yml
865 fail_on_unmatched_files: true
866 token: ${{ steps.app_token.outputs.token }}
867​
868 deploy_web:
869 name: Deploy hosted web app
870 needs: [preflight, relay_public_config, release]
871 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.release.result == 'success' }}
872 runs-on: blacksmith-8vcpu-ubuntu-2404
873 timeout-minutes: 10
874 env:
875 T3CODE_CLERK_PUBLISHABLE_KEY: ${{ needs.relay_public_config.outputs.clerk_publishable_key }}
876 T3CODE_CLERK_JWT_TEMPLATE: ${{ needs.relay_public_config.outputs.clerk_jwt_template }}
877 T3CODE_CLERK_CLI_OAUTH_CLIENT_ID: ${{ needs.relay_public_config.outputs.clerk_cli_oauth_client_id }}
878 T3CODE_RELAY_URL: ${{ needs.relay_public_config.outputs.relay_url }}
879 VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
880 VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
881 VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
882 T3CODE_WEB_ROUTER_URL: ${{ vars.T3CODE_WEB_ROUTER_URL }}
883 T3CODE_WEB_LATEST_DOMAIN: ${{ vars.T3CODE_WEB_LATEST_DOMAIN }}
884 T3CODE_WEB_NIGHTLY_DOMAIN: ${{ vars.T3CODE_WEB_NIGHTLY_DOMAIN }}
885 VERCEL_TEAM_SLUG: ${{ vars.VERCEL_TEAM_SLUG }}
886 steps:
887 - name: Checkout
888 uses: actions/checkout@v6
889 with:
890 ref: ${{ needs.preflight.outputs.ref }}
891 sparse-checkout: |
892 /*
893 !/.repos/
894 sparse-checkout-cone-mode: false
895​
896 - name: Setup Vite+
897 uses: voidzero-dev/setup-vp@v1
898 with:
899 node-version-file: package.json
900 cache: true
901 run-install: |
902 args:
903 - --filter=@t3tools/scripts...
904 - --filter=@t3tools/web...
905​
906 - name: Download relay client tracing config
907 uses: actions/download-artifact@v8
908 with:
909 name: relay-client-tracing-config
910 path: ${{ runner.temp }}/relay-client-tracing
911​
912 - name: Load relay client tracing config
913 shell: bash
914 run: |
915 config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env"
916 tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")"
917 echo "::add-mask::$tracing_token"
918 cat "$config_path" >> "$GITHUB_ENV"
919​
920 - name: Align package versions to release version
921 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
922​
923 - name: Refresh release lockfile
924 run: vp install --lockfile-only --ignore-scripts
925​
926 - name: Deploy and alias channel
927 shell: bash
928 run: |
929 set -euo pipefail
930​
931 if [[ -z "${VERCEL_TOKEN:-}" || -z "${VERCEL_ORG_ID:-}" || -z "${VERCEL_PROJECT_ID:-}" ]]; then
932 echo "Missing one or more required Vercel secrets: VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID." >&2
933 exit 1
934 fi
935​
936 router_url="${T3CODE_WEB_ROUTER_URL:-https://app.t3.codes}"
937 latest_domain="${T3CODE_WEB_LATEST_DOMAIN:-latest.app.t3.codes}"
938 nightly_domain="${T3CODE_WEB_NIGHTLY_DOMAIN:-nightly.app.t3.codes}"
939 router_domain="${router_url#http://}"
940 router_domain="${router_domain#https://}"
941 router_domain="${router_domain%%/*}"
942​
943 if [[ "${{ needs.preflight.outputs.release_channel }}" == "stable" ]]; then
944 channel_domain="$latest_domain"
945 channel_name="latest"
946 else
947 channel_domain="$nightly_domain"
948 channel_name="nightly"
949 fi
950​
951 vercel_scope="${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
952 vercel_scope_args=(--scope "$vercel_scope")
953​
954 echo "Deploying hosted web app for $channel_name channel."
955 deployment_url="$(
956 vp dlx vercel@53.1.1 deploy \
957 --archive=tgz \
958 --prod \
959 --skip-domain \
960 --yes \
961 --token "$VERCEL_TOKEN" \
962 "${vercel_scope_args[@]}" \
963 --build-env "APP_VERSION=${{ needs.preflight.outputs.version }}" \
964 --build-env "T3CODE_CLERK_PUBLISHABLE_KEY=${T3CODE_CLERK_PUBLISHABLE_KEY:-}" \
965 --build-env "T3CODE_CLERK_JWT_TEMPLATE=${T3CODE_CLERK_JWT_TEMPLATE:-}" \
966 --build-env "T3CODE_CLERK_CLI_OAUTH_CLIENT_ID=${T3CODE_CLERK_CLI_OAUTH_CLIENT_ID:-}" \
967 --build-env "T3CODE_RELAY_URL=${T3CODE_RELAY_URL:-}" \
968 --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=${T3CODE_RELAY_CLIENT_OTLP_TRACES_URL:-}" \
969 --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=${T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET:-}" \
970 --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=${T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN:-}" \
971 --build-env "VITE_HOSTED_APP_URL=$router_url" \
972 --build-env "VITE_HOSTED_APP_CHANNEL=$channel_name"
973 )"
974​
975 echo "Aliasing $deployment_url to $channel_domain."
976 vp dlx vercel@53.1.1 alias set "$deployment_url" "$channel_domain" \
977 --token "$VERCEL_TOKEN" \
978 "${vercel_scope_args[@]}"
979​
980 if [[ "$channel_name" == "latest" && -n "$router_domain" && "$router_domain" != "$channel_domain" ]]; then
981 echo "Aliasing $deployment_url to router domain $router_domain."
982 vp dlx vercel@53.1.1 alias set "$deployment_url" "$router_domain" \
983 --token "$VERCEL_TOKEN" \
984 "${vercel_scope_args[@]}"
985 fi
986​
987 finalize:
988 name: Finalize release
989 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}
990 needs: [preflight, release]
991 runs-on: blacksmith-8vcpu-ubuntu-2404
992 timeout-minutes: 10
993 steps:
994 - id: app_token
995 name: Mint release app token
996 uses: actions/create-github-app-token@v2
997 with:
998 app-id: ${{ secrets.RELEASE_APP_ID }}
999 private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
1000 owner: ${{ github.repository_owner }}
1001​
1002 - name: Checkout
1003 uses: actions/checkout@v6
1004 with:
1005 ref: main
1006 fetch-depth: 0
1007 token: ${{ steps.app_token.outputs.token }}
1008 persist-credentials: true
1009 sparse-checkout: |
1010 /*
1011 !/.repos/
1012 sparse-checkout-cone-mode: false
1013​
1014 - id: app_bot
1015 name: Resolve GitHub App bot identity
1016 env:
1017 GH_TOKEN: ${{ steps.app_token.outputs.token }}
1018 APP_SLUG: ${{ steps.app_token.outputs.app-slug }}
1019 run: |
1020 user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)"
1021 echo "name=${APP_SLUG}[bot]" >> "$GITHUB_OUTPUT"
1022 echo "email=${user_id}+${APP_SLUG}[bot]@users.noreply.github.com" >> "$GITHUB_OUTPUT"
1023​
1024 - name: Setup Vite+
1025 uses: voidzero-dev/setup-vp@v1
1026 with:
1027 node-version-file: package.json
1028 cache: true
1029 run-install: |
1030 args:
1031 - --filter=@t3tools/scripts...
1032 - --filter=@t3tools/oxlint-plugin-t3code...
1033​
1034 - id: update_versions
1035 name: Update version strings
1036 env:
1037 RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
1038 run: node scripts/update-release-package-versions.ts "$RELEASE_VERSION" --github-output
1039​
1040 - name: Format package.json files
1041 if: steps.update_versions.outputs.changed == 'true'
1042 run: vp fmt apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json
1043​
1044 - name: Refresh lockfile
1045 if: steps.update_versions.outputs.changed == 'true'
1046 run: vp install --lockfile-only --ignore-scripts
1047​
1048 - name: Commit and push version bump
1049 if: steps.update_versions.outputs.changed == 'true'
1050 shell: bash
1051 env:
1052 RELEASE_TAG: ${{ needs.preflight.outputs.tag }}
1053 run: |
1054 if git diff --quiet -- apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json pnpm-lock.yaml; then
1055 echo "No version changes to commit."
1056 exit 0
1057 fi
1058​
1059 git config user.name "${{ steps.app_bot.outputs.name }}"
1060 git config user.email "${{ steps.app_bot.outputs.email }}"
1061​
1062 git add apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json pnpm-lock.yaml
1063 git commit -m "chore(release): prepare $RELEASE_TAG"
1064 git push origin HEAD:main
1065​
1066 announce_discord:
1067 name: Announce release on Discord
1068 if: |
1069 always() && !cancelled() &&
1070 needs.preflight.result == 'success' &&
1071 needs.relay_public_config.result == 'success' &&
1072 needs.release.result == 'success' &&
1073 needs.deploy_web.result == 'success' &&
1074 (needs.finalize.result == 'success' || needs.finalize.result == 'skipped')
1075 needs: [preflight, relay_public_config, release, deploy_web, finalize]
1076 runs-on: blacksmith-8vcpu-ubuntu-2404
1077 timeout-minutes: 10
1078 steps:
1079 - name: Checkout
1080 uses: actions/checkout@v6
1081 with:
1082 ref: ${{ needs.preflight.outputs.ref }}
1083 sparse-checkout: |
1084 /*
1085 !/.repos/
1086 sparse-checkout-cone-mode: false
1087​
1088 - name: Setup Vite+
1089 uses: voidzero-dev/setup-vp@v1
1090 with:
1091 node-version-file: package.json
1092 cache: true
1093 run-install: |
1094 args:
1095 - --filter=@t3tools/scripts...
1096​
1097 - name: Announce prerelease on Discord
1098 if: needs.preflight.outputs.is_prerelease == 'true'
1099 continue-on-error: true
1100 env:
1101 DISCORD_MENTION_ROLE_ID: ${{ secrets.DISCORD_RELEASE_NIGHTLY_ROLE_ID }}
1102 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
1103 run: |
1104 node scripts/notify-discord-release.ts prerelease \
1105 --role-id "$DISCORD_MENTION_ROLE_ID" \
1106 --release-name "${{ needs.preflight.outputs.release_name }}" \
1107 --release-version "${{ needs.preflight.outputs.version }}" \
1108 --tag "${{ needs.preflight.outputs.tag }}" \
1109 --release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"
1110​
1111 - name: Announce latest release on Discord
1112 if: needs.preflight.outputs.make_latest == 'true'
1113 continue-on-error: true
1114 env:
1115 DISCORD_MENTION_ROLE_ID: ${{ secrets.DISCORD_RELEASE_LATEST_ROLE_ID }}
1116 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
1117 run: |
1118 node scripts/notify-discord-release.ts latest \
1119 --role-id "$DISCORD_MENTION_ROLE_ID" \
1120 --release-name "${{ needs.preflight.outputs.release_name }}" \
1121 --release-version "${{ needs.preflight.outputs.version }}" \
1122 --tag "${{ needs.preflight.outputs.tag }}" \
1123 --release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"