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