Open History to see the last commit
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/*.exe" \
612 "release/*.blockmap" \
613 "release/*.yml"; do
614 for file in $pattern; do
615 cp "$file" release-publish/
616 done
617 done
618
619 if [[ "${{ matrix.platform }}" == "mac" && "${{ matrix.arch }}" != "arm64" ]]; then
620 shopt -s nullglob
621 for manifest in release-publish/*-mac.yml; do
622 mv "$manifest" "${manifest%.yml}-${{ matrix.arch }}.yml"
623 done
624 fi
625
626 # Enable if Windows arm64 builds are enabled.
627 # Windows updater metadata is channel-specific (for example
628 # "latest.yml" or "nightly.yml"). Suffix each per-arch copy so the
629 # release job can merge matching arm64/x64 manifests back into one
630 # canonical manifest per channel.
631 # if [[ "${{ matrix.platform }}" == "win" ]]; then
632 # shopt -s nullglob
633 # for manifest in release-publish/*.yml; do
634 # mv "$manifest" "${manifest%.yml}-win-${{ matrix.arch }}.yml"
635 # done
636 # fi
637
638 - name: Collect resource monitor
639 shell: bash
640 run: |
641 set -euo pipefail
642 binary_name="t3-resource-monitor"
643 if [[ "${{ matrix.platform }}" == "win" ]]; then
644 binary_name="${binary_name}.exe"
645 fi
646 source_path="native/resource-monitor/target/${{ matrix.rust_target }}/release/${binary_name}"
647 target_dir="resource-monitor-publish/${{ matrix.resource_key }}"
648 mkdir -p "$target_dir"
649 cp "$source_path" "$target_dir/$binary_name"
650
651 - name: Upload build artifacts
652 uses: actions/upload-artifact@v7
653 with:
654 name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
655 path: release-publish/*
656 if-no-files-found: error
657
658 - name: Upload resource monitor
659 uses: actions/upload-artifact@v7
660 with:
661 name: resource-monitor-${{ matrix.resource_key }}
662 path: resource-monitor-publish/${{ matrix.resource_key }}/*
663 if-no-files-found: error
664
665 publish_cli:
666 name: Publish CLI to npm
667 needs: [preflight, relay_public_config, build]
668 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.build.result == 'success' }}
669 runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
670 timeout-minutes: 10
671 permissions:
672 contents: read
673 id-token: write
674 env:
675 T3CODE_CLERK_PUBLISHABLE_KEY: ${{ needs.relay_public_config.outputs.clerk_publishable_key }}
676 T3CODE_CLERK_JWT_TEMPLATE: ${{ needs.relay_public_config.outputs.clerk_jwt_template }}
677 T3CODE_CLERK_CLI_OAUTH_CLIENT_ID: ${{ needs.relay_public_config.outputs.clerk_cli_oauth_client_id }}
678 T3CODE_RELAY_URL: ${{ needs.relay_public_config.outputs.relay_url }}
679 steps:
680 - name: Checkout
681 uses: actions/checkout@v6
682 with:
683 ref: ${{ needs.preflight.outputs.ref }}
684 sparse-checkout: |
685 /*
686 !/.repos/
687 sparse-checkout-cone-mode: false
688
689 - name: Setup Vite+
690 uses: voidzero-dev/setup-vp@v1
691 with:
692 node-version-file: package.json
693 cache: true
694 run-install: |
695 args:
696 - --filter=t3...
697 - --filter=@t3tools/web...
698 - --filter=@t3tools/scripts...
699
700 - name: Download relay client tracing config
701 uses: actions/download-artifact@v8
702 with:
703 name: relay-client-tracing-config
704 path: ${{ runner.temp }}/relay-client-tracing
705
706 - name: Load relay client tracing config
707 shell: bash
708 run: |
709 config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env"
710 tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")"
711 echo "::add-mask::$tracing_token"
712 cat "$config_path" >> "$GITHUB_ENV"
713
714 - name: Align package versions to release version
715 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
716
717 - name: Build web package
718 run: vp run --filter @t3tools/web build
719
720 - name: Build CLI package
721 run: vp run --filter t3 build
722
723 - name: Download resource monitors
724 uses: actions/download-artifact@v8
725 with:
726 pattern: resource-monitor-*
727 path: ${{ runner.temp }}/resource-monitors
728
729 - name: Bundle resource monitors into CLI package
730 shell: bash
731 run: |
732 set -euo pipefail
733 for artifact_dir in "$RUNNER_TEMP"/resource-monitors/resource-monitor-*; do
734 resource_key="${artifact_dir##*/resource-monitor-}"
735 target_dir="apps/server/dist/resource-monitor/${resource_key}"
736 mkdir -p "$target_dir"
737 cp "$artifact_dir"/t3-resource-monitor* "$target_dir/"
738 chmod +x "$target_dir"/t3-resource-monitor 2>/dev/null || true
739 done
740
741 - name: Publish CLI package
742 run: node apps/server/scripts/cli.ts publish --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --app-version "${{ needs.preflight.outputs.version }}" --verbose
743
744 release:
745 name: Publish GitHub Release
746 needs: [preflight, build, publish_cli]
747 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.build.result == 'success' && needs.publish_cli.result == 'success' }}
748 runs-on: blacksmith-8vcpu-ubuntu-2404
749 timeout-minutes: 10
750 steps:
751 - id: app_token
752 name: Mint release app token
753 uses: actions/create-github-app-token@v2
754 with:
755 app-id: ${{ secrets.RELEASE_APP_ID }}
756 private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
757 owner: ${{ github.repository_owner }}
758
759 - name: Checkout
760 uses: actions/checkout@v6
761 with:
762 ref: ${{ needs.preflight.outputs.ref }}
763 sparse-checkout: |
764 /*
765 !/.repos/
766 sparse-checkout-cone-mode: false
767
768 - name: Setup Vite+
769 uses: voidzero-dev/setup-vp@v1
770 with:
771 node-version-file: package.json
772 cache: true
773 run-install: |
774 args:
775 - --filter=@t3tools/scripts...
776
777 - name: Download all desktop artifacts
778 uses: actions/download-artifact@v8
779 with:
780 pattern: desktop-*
781 merge-multiple: true
782 path: release-assets
783
784 - name: Merge macOS updater manifests
785 run: |
786 shopt -s nullglob
787 for x64_manifest in release-assets/*-mac-x64.yml; do
788 arm64_manifest="${x64_manifest%-x64.yml}.yml"
789 if [[ -f "$arm64_manifest" ]]; then
790 node scripts/merge-update-manifests.ts --platform mac "$arm64_manifest" "$x64_manifest"
791 rm -f "$x64_manifest"
792 fi
793 done
794
795 # - name: Merge Windows updater manifests
796 # run: |
797 # shopt -s nullglob
798 # found_windows_manifest=false
799 # for x64_manifest in release-assets/*-win-x64.yml; do
800 # if [[ "$(basename "$x64_manifest")" == builder-debug-* ]]; then
801 # continue
802 # fi
803
804 # arm64_manifest="${x64_manifest/-x64.yml/-arm64.yml}"
805 # output_manifest="${x64_manifest/-win-x64.yml/.yml}"
806 # if [[ ! -f "$arm64_manifest" ]]; then
807 # echo "Missing matching arm64 Windows manifest for $x64_manifest" >&2
808 # exit 1
809 # fi
810
811 # found_windows_manifest=true
812 # node scripts/merge-update-manifests.ts --platform win \
813 # "$arm64_manifest" \
814 # "$x64_manifest" \
815 # "$output_manifest"
816 # rm -f "$arm64_manifest" "$x64_manifest"
817 # done
818
819 # if [[ "$found_windows_manifest" != true ]]; then
820 # echo "No Windows updater manifests found to merge." >&2
821 # exit 1
822 # fi
823
824 - name: Publish release
825 if: needs.preflight.outputs.previous_tag != ''
826 uses: softprops/action-gh-release@v2
827 with:
828 tag_name: ${{ needs.preflight.outputs.tag }}
829 target_commitish: ${{ needs.preflight.outputs.ref }}
830 name: ${{ needs.preflight.outputs.release_name }}
831 generate_release_notes: true
832 previous_tag: ${{ needs.preflight.outputs.previous_tag }}
833 prerelease: ${{ needs.preflight.outputs.is_prerelease }}
834 make_latest: ${{ needs.preflight.outputs.make_latest }}
835 files: |
836 release-assets/*.dmg
837 release-assets/*.zip
838 release-assets/*.AppImage
839 release-assets/*.exe
840 release-assets/*.blockmap
841 release-assets/*.yml
842 fail_on_unmatched_files: true
843 token: ${{ steps.app_token.outputs.token }}
844
845 - name: Publish first release
846 if: needs.preflight.outputs.previous_tag == ''
847 uses: softprops/action-gh-release@v2
848 with:
849 tag_name: ${{ needs.preflight.outputs.tag }}
850 target_commitish: ${{ needs.preflight.outputs.ref }}
851 name: ${{ needs.preflight.outputs.release_name }}
852 generate_release_notes: true
853 prerelease: ${{ needs.preflight.outputs.is_prerelease }}
854 make_latest: ${{ needs.preflight.outputs.make_latest }}
855 files: |
856 release-assets/*.dmg
857 release-assets/*.zip
858 release-assets/*.AppImage
859 release-assets/*.exe
860 release-assets/*.blockmap
861 release-assets/*.yml
862 fail_on_unmatched_files: true
863 token: ${{ steps.app_token.outputs.token }}
864
865 deploy_web:
866 name: Deploy hosted web app
867 needs: [preflight, relay_public_config, release]
868 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.relay_public_config.result == 'success' && needs.release.result == 'success' }}
869 runs-on: blacksmith-8vcpu-ubuntu-2404
870 timeout-minutes: 10
871 env:
872 T3CODE_CLERK_PUBLISHABLE_KEY: ${{ needs.relay_public_config.outputs.clerk_publishable_key }}
873 T3CODE_CLERK_JWT_TEMPLATE: ${{ needs.relay_public_config.outputs.clerk_jwt_template }}
874 T3CODE_CLERK_CLI_OAUTH_CLIENT_ID: ${{ needs.relay_public_config.outputs.clerk_cli_oauth_client_id }}
875 T3CODE_RELAY_URL: ${{ needs.relay_public_config.outputs.relay_url }}
876 VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
877 VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
878 VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
879 T3CODE_WEB_ROUTER_URL: ${{ vars.T3CODE_WEB_ROUTER_URL }}
880 T3CODE_WEB_LATEST_DOMAIN: ${{ vars.T3CODE_WEB_LATEST_DOMAIN }}
881 T3CODE_WEB_NIGHTLY_DOMAIN: ${{ vars.T3CODE_WEB_NIGHTLY_DOMAIN }}
882 VERCEL_TEAM_SLUG: ${{ vars.VERCEL_TEAM_SLUG }}
883 steps:
884 - name: Checkout
885 uses: actions/checkout@v6
886 with:
887 ref: ${{ needs.preflight.outputs.ref }}
888 sparse-checkout: |
889 /*
890 !/.repos/
891 sparse-checkout-cone-mode: false
892
893 - name: Setup Vite+
894 uses: voidzero-dev/setup-vp@v1
895 with:
896 node-version-file: package.json
897 cache: true
898 run-install: |
899 args:
900 - --filter=@t3tools/scripts...
901 - --filter=@t3tools/web...
902
903 - name: Download relay client tracing config
904 uses: actions/download-artifact@v8
905 with:
906 name: relay-client-tracing-config
907 path: ${{ runner.temp }}/relay-client-tracing
908
909 - name: Load relay client tracing config
910 shell: bash
911 run: |
912 config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env"
913 tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")"
914 echo "::add-mask::$tracing_token"
915 cat "$config_path" >> "$GITHUB_ENV"
916
917 - name: Align package versions to release version
918 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
919
920 - name: Refresh release lockfile
921 run: vp install --lockfile-only --ignore-scripts
922
923 - name: Deploy and alias channel
924 shell: bash
925 run: |
926 set -euo pipefail
927
928 if [[ -z "${VERCEL_TOKEN:-}" || -z "${VERCEL_ORG_ID:-}" || -z "${VERCEL_PROJECT_ID:-}" ]]; then
929 echo "Missing one or more required Vercel secrets: VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID." >&2
930 exit 1
931 fi
932
933 router_url="${T3CODE_WEB_ROUTER_URL:-https://app.t3.codes}"
934 latest_domain="${T3CODE_WEB_LATEST_DOMAIN:-latest.app.t3.codes}"
935 nightly_domain="${T3CODE_WEB_NIGHTLY_DOMAIN:-nightly.app.t3.codes}"
936 router_domain="${router_url#http://}"
937 router_domain="${router_domain#https://}"
938 router_domain="${router_domain%%/*}"
939
940 if [[ "${{ needs.preflight.outputs.release_channel }}" == "stable" ]]; then
941 channel_domain="$latest_domain"
942 channel_name="latest"
943 else
944 channel_domain="$nightly_domain"
945 channel_name="nightly"
946 fi
947
948 vercel_scope="${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
949 vercel_scope_args=(--scope "$vercel_scope")
950
951 echo "Deploying hosted web app for $channel_name channel."
952 deployment_url="$(
953 vp dlx vercel@53.1.1 deploy \
954 --archive=tgz \
955 --prod \
956 --skip-domain \
957 --yes \
958 --token "$VERCEL_TOKEN" \
959 "${vercel_scope_args[@]}" \
960 --build-env "APP_VERSION=${{ needs.preflight.outputs.version }}" \
961 --build-env "T3CODE_CLERK_PUBLISHABLE_KEY=${T3CODE_CLERK_PUBLISHABLE_KEY:-}" \
962 --build-env "T3CODE_CLERK_JWT_TEMPLATE=${T3CODE_CLERK_JWT_TEMPLATE:-}" \
963 --build-env "T3CODE_CLERK_CLI_OAUTH_CLIENT_ID=${T3CODE_CLERK_CLI_OAUTH_CLIENT_ID:-}" \
964 --build-env "T3CODE_RELAY_URL=${T3CODE_RELAY_URL:-}" \
965 --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_URL=${T3CODE_RELAY_CLIENT_OTLP_TRACES_URL:-}" \
966 --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET=${T3CODE_RELAY_CLIENT_OTLP_TRACES_DATASET:-}" \
967 --build-env "T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=${T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN:-}" \
968 --build-env "VITE_HOSTED_APP_URL=$router_url" \
969 --build-env "VITE_HOSTED_APP_CHANNEL=$channel_name"
970 )"
971
972 echo "Aliasing $deployment_url to $channel_domain."
973 vp dlx vercel@53.1.1 alias set "$deployment_url" "$channel_domain" \
974 --token "$VERCEL_TOKEN" \
975 "${vercel_scope_args[@]}"
976
977 if [[ "$channel_name" == "latest" && -n "$router_domain" && "$router_domain" != "$channel_domain" ]]; then
978 echo "Aliasing $deployment_url to router domain $router_domain."
979 vp dlx vercel@53.1.1 alias set "$deployment_url" "$router_domain" \
980 --token "$VERCEL_TOKEN" \
981 "${vercel_scope_args[@]}"
982 fi
983
984 finalize:
985 name: Finalize release
986 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}
987 needs: [preflight, release]
988 runs-on: blacksmith-8vcpu-ubuntu-2404
989 timeout-minutes: 10
990 steps:
991 - id: app_token
992 name: Mint release app token
993 uses: actions/create-github-app-token@v2
994 with:
995 app-id: ${{ secrets.RELEASE_APP_ID }}
996 private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
997 owner: ${{ github.repository_owner }}
998
999 - name: Checkout
1000 uses: actions/checkout@v6
1001 with:
1002 ref: main
1003 fetch-depth: 0
1004 token: ${{ steps.app_token.outputs.token }}
1005 persist-credentials: true
1006 sparse-checkout: |
1007 /*
1008 !/.repos/
1009 sparse-checkout-cone-mode: false
1010
1011 - id: app_bot
1012 name: Resolve GitHub App bot identity
1013 env:
1014 GH_TOKEN: ${{ steps.app_token.outputs.token }}
1015 APP_SLUG: ${{ steps.app_token.outputs.app-slug }}
1016 run: |
1017 user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)"
1018 echo "name=${APP_SLUG}[bot]" >> "$GITHUB_OUTPUT"
1019 echo "email=${user_id}+${APP_SLUG}[bot]@users.noreply.github.com" >> "$GITHUB_OUTPUT"
1020
1021 - name: Setup Vite+
1022 uses: voidzero-dev/setup-vp@v1
1023 with:
1024 node-version-file: package.json
1025 cache: true
1026 run-install: |
1027 args:
1028 - --filter=@t3tools/scripts...
1029 - --filter=@t3tools/oxlint-plugin-t3code...
1030
1031 - id: update_versions
1032 name: Update version strings
1033 env:
1034 RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
1035 run: node scripts/update-release-package-versions.ts "$RELEASE_VERSION" --github-output
1036
1037 - name: Format package.json files
1038 if: steps.update_versions.outputs.changed == 'true'
1039 run: vp fmt apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json
1040
1041 - name: Refresh lockfile
1042 if: steps.update_versions.outputs.changed == 'true'
1043 run: vp install --lockfile-only --ignore-scripts
1044
1045 - name: Commit and push version bump
1046 if: steps.update_versions.outputs.changed == 'true'
1047 shell: bash
1048 env:
1049 RELEASE_TAG: ${{ needs.preflight.outputs.tag }}
1050 run: |
1051 if git diff --quiet -- apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json pnpm-lock.yaml; then
1052 echo "No version changes to commit."
1053 exit 0
1054 fi
1055
1056 git config user.name "${{ steps.app_bot.outputs.name }}"
1057 git config user.email "${{ steps.app_bot.outputs.email }}"
1058
1059 git add apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json pnpm-lock.yaml
1060 git commit -m "chore(release): prepare $RELEASE_TAG"
1061 git push origin HEAD:main
1062
1063 announce_discord:
1064 name: Announce release on Discord
1065 if: |
1066 always() && !cancelled() &&
1067 needs.preflight.result == 'success' &&
1068 needs.relay_public_config.result == 'success' &&
1069 needs.release.result == 'success' &&
1070 needs.deploy_web.result == 'success' &&
1071 (needs.finalize.result == 'success' || needs.finalize.result == 'skipped')
1072 needs: [preflight, relay_public_config, release, deploy_web, finalize]
1073 runs-on: blacksmith-8vcpu-ubuntu-2404
1074 timeout-minutes: 10
1075 steps:
1076 - name: Checkout
1077 uses: actions/checkout@v6
1078 with:
1079 ref: ${{ needs.preflight.outputs.ref }}
1080 sparse-checkout: |
1081 /*
1082 !/.repos/
1083 sparse-checkout-cone-mode: false
1084
1085 - name: Setup Vite+
1086 uses: voidzero-dev/setup-vp@v1
1087 with:
1088 node-version-file: package.json
1089 cache: true
1090 run-install: |
1091 args:
1092 - --filter=@t3tools/scripts...
1093
1094 - name: Announce prerelease on Discord
1095 if: needs.preflight.outputs.is_prerelease == 'true'
1096 continue-on-error: true
1097 env:
1098 DISCORD_MENTION_ROLE_ID: ${{ secrets.DISCORD_RELEASE_NIGHTLY_ROLE_ID }}
1099 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
1100 run: |
1101 node scripts/notify-discord-release.ts prerelease \
1102 --role-id "$DISCORD_MENTION_ROLE_ID" \
1103 --release-name "${{ needs.preflight.outputs.release_name }}" \
1104 --release-version "${{ needs.preflight.outputs.version }}" \
1105 --tag "${{ needs.preflight.outputs.tag }}" \
1106 --release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"
1107
1108 - name: Announce latest release on Discord
1109 if: needs.preflight.outputs.make_latest == 'true'
1110 continue-on-error: true
1111 env:
1112 DISCORD_MENTION_ROLE_ID: ${{ secrets.DISCORD_RELEASE_LATEST_ROLE_ID }}
1113 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
1114 run: |
1115 node scripts/notify-discord-release.ts latest \
1116 --role-id "$DISCORD_MENTION_ROLE_ID" \
1117 --release-name "${{ needs.preflight.outputs.release_name }}" \
1118 --release-version "${{ needs.preflight.outputs.version }}" \
1119 --tag "${{ needs.preflight.outputs.tag }}" \
1120 --release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"