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: write
27 id-token: write
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 Bun
89 uses: oven-sh/setup-bun@v2
90 with:
91 bun-version-file: package.json
92
93 - name: Setup Node
94 uses: actions/setup-node@v6
95 with:
96 node-version-file: package.json
97
98 - name: Install dependencies
99 run: bun install --frozen-lockfile
100
101 - id: release_meta
102 name: Resolve release version
103 shell: bash
104 env:
105 DISPATCH_CHANNEL: ${{ github.event.inputs.channel }}
106 DISPATCH_VERSION: ${{ github.event.inputs.version }}
107 NIGHTLY_DATE: ${{ github.run_started_at }}
108 NIGHTLY_SHA: ${{ github.sha }}
109 NIGHTLY_RUN_NUMBER: ${{ github.run_number }}
110 run: |
111 if [[ "${GITHUB_EVENT_NAME}" == "schedule" || ( "${GITHUB_EVENT_NAME}" == "workflow_dispatch" && "${DISPATCH_CHANNEL:-stable}" == "nightly" ) ]]; then
112 nightly_date="$(date -u -d "$NIGHTLY_DATE" +%Y%m%d)"
113
114 node scripts/resolve-nightly-release.ts \
115 --date "$nightly_date" \
116 --run-number "$NIGHTLY_RUN_NUMBER" \
117 --sha "$NIGHTLY_SHA" \
118 --github-output
119
120 echo "release_channel=nightly" >> "$GITHUB_OUTPUT"
121 echo "cli_dist_tag=nightly" >> "$GITHUB_OUTPUT"
122 echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
123 echo "make_latest=false" >> "$GITHUB_OUTPUT"
124 else
125 if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
126 raw="${DISPATCH_VERSION}"
127 if [[ -z "$raw" ]]; then
128 echo "workflow_dispatch stable releases require the version input." >&2
129 exit 1
130 fi
131 else
132 raw="${GITHUB_REF_NAME}"
133 fi
134
135 version="${raw#v}"
136 if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then
137 echo "Invalid release version: $raw" >&2
138 exit 1
139 fi
140
141 echo "release_channel=stable" >> "$GITHUB_OUTPUT"
142 echo "version=$version" >> "$GITHUB_OUTPUT"
143 echo "tag=v$version" >> "$GITHUB_OUTPUT"
144 echo "name=T3 Code v$version" >> "$GITHUB_OUTPUT"
145 echo "cli_dist_tag=latest" >> "$GITHUB_OUTPUT"
146 if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
147 echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
148 echo "make_latest=true" >> "$GITHUB_OUTPUT"
149 else
150 echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
151 echo "make_latest=false" >> "$GITHUB_OUTPUT"
152 fi
153 fi
154
155 - name: Lint
156 run: bun run lint
157
158 - name: Typecheck
159 run: bun run typecheck
160
161 - name: Test
162 run: bun run test
163
164 - id: previous_tag
165 name: Resolve previous release tag
166 run: |
167 node scripts/resolve-previous-release-tag.ts \
168 --channel "${{ steps.release_meta.outputs.release_channel }}" \
169 --current-tag "${{ steps.release_meta.outputs.tag }}" \
170 --github-output
171
172 build:
173 name: Build ${{ matrix.label }}
174 needs: preflight
175 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
176 runs-on: ${{ matrix.runner }}
177 timeout-minutes: 30
178 strategy:
179 fail-fast: false
180 matrix:
181 include:
182 - label: macOS arm64
183 runner: blacksmith-12vcpu-macos-26
184 platform: mac
185 target: dmg
186 arch: arm64
187 - label: macOS x64
188 runner: blacksmith-12vcpu-macos-26
189 platform: mac
190 target: dmg
191 arch: x64
192 - label: Linux x64
193 runner: blacksmith-32vcpu-ubuntu-2404
194 platform: linux
195 target: AppImage
196 arch: x64
197 - label: Windows x64
198 runner: blacksmith-32vcpu-windows-2025
199 platform: win
200 target: nsis
201 arch: x64
202 # - label: Windows arm64
203 # runner: windows-11-arm
204 # platform: win
205 # target: nsis
206 # arch: arm64
207 steps:
208 - name: Checkout
209 uses: actions/checkout@v6
210 with:
211 ref: ${{ needs.preflight.outputs.ref }}
212 fetch-depth: 0
213
214 - name: Setup Bun
215 uses: oven-sh/setup-bun@v2
216 with:
217 bun-version-file: package.json
218
219 - name: Setup Node
220 uses: actions/setup-node@v6
221 with:
222 node-version-file: package.json
223
224 - name: Install dependencies
225 run: bun install --frozen-lockfile
226
227 - name: Align package versions to release version
228 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
229
230 - name: Install Spectre-mitigated MSVC libs
231 if: matrix.platform == 'win'
232 shell: pwsh
233 run: |
234 $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
235 $installPath = & $vswhere -products * -latest -property installationPath
236 $setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
237 $proc = Start-Process -FilePath $setupExe `
238 -ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
239 "Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre", "--quiet", "--norestart" `
240 -Wait -PassThru -NoNewWindow
241 if ($null -eq $proc -or $proc.ExitCode -ne 0) {
242 $code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
243 Write-Error "Visual Studio Installer failed with exit code $code"
244 exit $code
245 }
246
247 - name: Build desktop artifact
248 shell: bash
249 env:
250 CSC_LINK: ${{ secrets.CSC_LINK }}
251 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
252 APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
253 APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
254 APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
255 AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
256 AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
257 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
258 AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
259 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
260 AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
261 AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
262 run: |
263 args=(
264 --platform "${{ matrix.platform }}"
265 --target "${{ matrix.target }}"
266 --arch "${{ matrix.arch }}"
267 --build-version "${{ needs.preflight.outputs.version }}"
268 --verbose
269 )
270
271 has_all() {
272 for value in "$@"; do
273 if [[ -z "$value" ]]; then
274 return 1
275 fi
276 done
277 return 0
278 }
279
280 if [[ "${{ matrix.platform }}" == "mac" ]]; then
281 if has_all "$CSC_LINK" "$CSC_KEY_PASSWORD" "$APPLE_API_KEY" "$APPLE_API_KEY_ID" "$APPLE_API_ISSUER"; then
282 key_path="$RUNNER_TEMP/AuthKey_${APPLE_API_KEY_ID}.p8"
283 printf '%s' "$APPLE_API_KEY" > "$key_path"
284 export APPLE_API_KEY="$key_path"
285 echo "macOS signing enabled."
286 args+=(--signed)
287 else
288 echo "macOS signing disabled (missing one or more Apple signing secrets)."
289 fi
290 elif [[ "${{ matrix.platform }}" == "win" ]]; then
291 if has_all \
292 "$AZURE_TENANT_ID" \
293 "$AZURE_CLIENT_ID" \
294 "$AZURE_CLIENT_SECRET" \
295 "$AZURE_TRUSTED_SIGNING_ENDPOINT" \
296 "$AZURE_TRUSTED_SIGNING_ACCOUNT_NAME" \
297 "$AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME" \
298 "$AZURE_TRUSTED_SIGNING_PUBLISHER_NAME"; then
299 echo "Windows signing enabled (Azure Trusted Signing)."
300 args+=(--signed)
301 else
302 echo "Windows signing disabled (missing one or more Azure Trusted Signing secrets)."
303 fi
304 else
305 echo "Signing disabled for ${{ matrix.platform }}."
306 fi
307
308 bun run dist:desktop:artifact -- "${args[@]}"
309
310 - name: Collect release assets
311 shell: bash
312 run: |
313 set -euo pipefail
314 mkdir -p release-publish
315
316 shopt -s nullglob
317 for pattern in \
318 "release/*.dmg" \
319 "release/*.zip" \
320 "release/*.AppImage" \
321 "release/*.exe" \
322 "release/*.blockmap" \
323 "release/*.yml"; do
324 for file in $pattern; do
325 cp "$file" release-publish/
326 done
327 done
328
329 if [[ "${{ matrix.platform }}" == "mac" && "${{ matrix.arch }}" != "arm64" ]]; then
330 shopt -s nullglob
331 for manifest in release-publish/*-mac.yml; do
332 mv "$manifest" "${manifest%.yml}-${{ matrix.arch }}.yml"
333 done
334 fi
335
336 # Enable if Windows arm64 builds are enabled.
337 # Windows updater metadata is channel-specific (for example
338 # "latest.yml" or "nightly.yml"). Suffix each per-arch copy so the
339 # release job can merge matching arm64/x64 manifests back into one
340 # canonical manifest per channel.
341 # if [[ "${{ matrix.platform }}" == "win" ]]; then
342 # shopt -s nullglob
343 # for manifest in release-publish/*.yml; do
344 # mv "$manifest" "${manifest%.yml}-win-${{ matrix.arch }}.yml"
345 # done
346 # fi
347
348 - name: Upload build artifacts
349 uses: actions/upload-artifact@v7
350 with:
351 name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
352 path: release-publish/*
353 if-no-files-found: error
354
355 publish_cli:
356 name: Publish CLI to npm
357 needs: [preflight, build]
358 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.build.result == 'success' }}
359 runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404
360 timeout-minutes: 10
361 steps:
362 - name: Checkout
363 uses: actions/checkout@v6
364 with:
365 ref: ${{ needs.preflight.outputs.ref }}
366
367 - name: Setup Bun
368 uses: oven-sh/setup-bun@v2
369 with:
370 bun-version-file: package.json
371
372 - name: Setup Node
373 uses: actions/setup-node@v6
374 with:
375 node-version-file: package.json
376 registry-url: https://registry.npmjs.org
377
378 - name: Install dependencies
379 run: bun install --frozen-lockfile --filter=t3 --filter=@t3tools/web --filter=@t3tools/scripts
380
381 - name: Align package versions to release version
382 run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
383
384 - name: Build web package
385 run: bun --filter=@t3tools/web run build
386
387 - name: Build CLI package
388 run: bun --filter=t3 run build
389
390 - name: Publish CLI package
391 run: node apps/server/scripts/cli.ts publish --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --app-version "${{ needs.preflight.outputs.version }}" --verbose
392
393 release:
394 name: Publish GitHub Release
395 needs: [preflight, build, publish_cli]
396 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.build.result == 'success' && needs.publish_cli.result == 'success' }}
397 runs-on: blacksmith-8vcpu-ubuntu-2404
398 timeout-minutes: 10
399 steps:
400 - id: app_token
401 name: Mint release app token
402 uses: actions/create-github-app-token@v2
403 with:
404 app-id: ${{ secrets.RELEASE_APP_ID }}
405 private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
406 owner: ${{ github.repository_owner }}
407
408 - name: Checkout
409 uses: actions/checkout@v6
410 with:
411 ref: ${{ needs.preflight.outputs.ref }}
412
413 - name: Setup Bun
414 uses: oven-sh/setup-bun@v2
415 with:
416 bun-version-file: package.json
417
418 - name: Setup Node
419 uses: actions/setup-node@v6
420 with:
421 node-version-file: package.json
422
423 - name: Install dependencies
424 run: bun install --frozen-lockfile --filter=@t3tools/scripts
425
426 - name: Download all desktop artifacts
427 uses: actions/download-artifact@v8
428 with:
429 pattern: desktop-*
430 merge-multiple: true
431 path: release-assets
432
433 - name: Merge macOS updater manifests
434 run: |
435 shopt -s nullglob
436 for x64_manifest in release-assets/*-mac-x64.yml; do
437 arm64_manifest="${x64_manifest%-x64.yml}.yml"
438 if [[ -f "$arm64_manifest" ]]; then
439 node scripts/merge-update-manifests.ts --platform mac "$arm64_manifest" "$x64_manifest"
440 rm -f "$x64_manifest"
441 fi
442 done
443
444 # - name: Merge Windows updater manifests
445 # run: |
446 # shopt -s nullglob
447 # found_windows_manifest=false
448 # for x64_manifest in release-assets/*-win-x64.yml; do
449 # if [[ "$(basename "$x64_manifest")" == builder-debug-* ]]; then
450 # continue
451 # fi
452
453 # arm64_manifest="${x64_manifest/-x64.yml/-arm64.yml}"
454 # output_manifest="${x64_manifest/-win-x64.yml/.yml}"
455 # if [[ ! -f "$arm64_manifest" ]]; then
456 # echo "Missing matching arm64 Windows manifest for $x64_manifest" >&2
457 # exit 1
458 # fi
459
460 # found_windows_manifest=true
461 # node scripts/merge-update-manifests.ts --platform win \
462 # "$arm64_manifest" \
463 # "$x64_manifest" \
464 # "$output_manifest"
465 # rm -f "$arm64_manifest" "$x64_manifest"
466 # done
467
468 # if [[ "$found_windows_manifest" != true ]]; then
469 # echo "No Windows updater manifests found to merge." >&2
470 # exit 1
471 # fi
472
473 - name: Publish release
474 if: needs.preflight.outputs.previous_tag != ''
475 uses: softprops/action-gh-release@v2
476 with:
477 tag_name: ${{ needs.preflight.outputs.tag }}
478 target_commitish: ${{ needs.preflight.outputs.ref }}
479 name: ${{ needs.preflight.outputs.release_name }}
480 generate_release_notes: true
481 previous_tag: ${{ needs.preflight.outputs.previous_tag }}
482 prerelease: ${{ needs.preflight.outputs.is_prerelease }}
483 make_latest: ${{ needs.preflight.outputs.make_latest }}
484 files: |
485 release-assets/*.dmg
486 release-assets/*.zip
487 release-assets/*.AppImage
488 release-assets/*.exe
489 release-assets/*.blockmap
490 release-assets/*.yml
491 fail_on_unmatched_files: true
492 token: ${{ steps.app_token.outputs.token }}
493
494 - name: Publish first release
495 if: needs.preflight.outputs.previous_tag == ''
496 uses: softprops/action-gh-release@v2
497 with:
498 tag_name: ${{ needs.preflight.outputs.tag }}
499 target_commitish: ${{ needs.preflight.outputs.ref }}
500 name: ${{ needs.preflight.outputs.release_name }}
501 generate_release_notes: true
502 prerelease: ${{ needs.preflight.outputs.is_prerelease }}
503 make_latest: ${{ needs.preflight.outputs.make_latest }}
504 files: |
505 release-assets/*.dmg
506 release-assets/*.zip
507 release-assets/*.AppImage
508 release-assets/*.exe
509 release-assets/*.blockmap
510 release-assets/*.yml
511 fail_on_unmatched_files: true
512 token: ${{ steps.app_token.outputs.token }}
513
514 finalize:
515 name: Finalize release
516 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}
517 needs: [preflight, release]
518 runs-on: blacksmith-8vcpu-ubuntu-2404
519 timeout-minutes: 10
520 steps:
521 - id: app_token
522 name: Mint release app token
523 uses: actions/create-github-app-token@v2
524 with:
525 app-id: ${{ secrets.RELEASE_APP_ID }}
526 private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
527 owner: ${{ github.repository_owner }}
528
529 - name: Checkout
530 uses: actions/checkout@v6
531 with:
532 ref: main
533 fetch-depth: 0
534 token: ${{ steps.app_token.outputs.token }}
535 persist-credentials: true
536
537 - id: app_bot
538 name: Resolve GitHub App bot identity
539 env:
540 GH_TOKEN: ${{ steps.app_token.outputs.token }}
541 APP_SLUG: ${{ steps.app_token.outputs.app-slug }}
542 run: |
543 user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)"
544 echo "name=${APP_SLUG}[bot]" >> "$GITHUB_OUTPUT"
545 echo "email=${user_id}+${APP_SLUG}[bot]@users.noreply.github.com" >> "$GITHUB_OUTPUT"
546
547 - name: Setup Bun
548 uses: oven-sh/setup-bun@v2
549 with:
550 bun-version-file: package.json
551
552 - name: Setup Node
553 uses: actions/setup-node@v6
554 with:
555 node-version-file: package.json
556
557 - name: Install dependencies
558 run: bun install --frozen-lockfile --filter=@t3tools/scripts
559
560 - id: update_versions
561 name: Update version strings
562 env:
563 RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
564 run: node scripts/update-release-package-versions.ts "$RELEASE_VERSION" --github-output
565
566 - name: Format package.json files
567 if: steps.update_versions.outputs.changed == 'true'
568 run: bunx oxfmt@0.40.0 apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json
569
570 - name: Refresh lockfile
571 if: steps.update_versions.outputs.changed == 'true'
572 run: bun install --lockfile-only --ignore-scripts
573
574 - name: Commit and push version bump
575 if: steps.update_versions.outputs.changed == 'true'
576 shell: bash
577 env:
578 RELEASE_TAG: ${{ needs.preflight.outputs.tag }}
579 run: |
580 if git diff --quiet -- apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json bun.lock; then
581 echo "No version changes to commit."
582 exit 0
583 fi
584
585 git config user.name "${{ steps.app_bot.outputs.name }}"
586 git config user.email "${{ steps.app_bot.outputs.email }}"
587
588 git add apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json bun.lock
589 git commit -m "chore(release): prepare $RELEASE_TAG"
590 git push origin HEAD:main
591
592 announce_discord:
593 name: Announce release on Discord
594 if: |
595 always() && !cancelled() &&
596 needs.preflight.result == 'success' &&
597 needs.release.result == 'success' &&
598 (needs.finalize.result == 'success' || needs.finalize.result == 'skipped')
599 needs: [preflight, release, finalize]
600 runs-on: blacksmith-8vcpu-ubuntu-2404
601 timeout-minutes: 10
602 steps:
603 - name: Checkout
604 uses: actions/checkout@v6
605 with:
606 ref: ${{ needs.preflight.outputs.ref }}
607
608 - name: Setup Bun
609 uses: oven-sh/setup-bun@v2
610 with:
611 bun-version-file: package.json
612
613 - name: Setup Node
614 uses: actions/setup-node@v6
615 with:
616 node-version-file: package.json
617
618 - name: Install dependencies
619 run: bun install --frozen-lockfile --filter=@t3tools/scripts
620
621 - name: Announce prerelease on Discord
622 if: needs.preflight.outputs.is_prerelease == 'true'
623 continue-on-error: true
624 env:
625 DISCORD_MENTION_ROLE_ID: ${{ secrets.DISCORD_RELEASE_NIGHTLY_ROLE_ID }}
626 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
627 run: |
628 node scripts/notify-discord-release.ts prerelease \
629 --role-id "$DISCORD_MENTION_ROLE_ID" \
630 --release-name "${{ needs.preflight.outputs.release_name }}" \
631 --release-version "${{ needs.preflight.outputs.version }}" \
632 --tag "${{ needs.preflight.outputs.tag }}" \
633 --release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"
634
635 - name: Announce latest release on Discord
636 if: needs.preflight.outputs.make_latest == 'true'
637 continue-on-error: true
638 env:
639 DISCORD_MENTION_ROLE_ID: ${{ secrets.DISCORD_RELEASE_LATEST_ROLE_ID }}
640 DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
641 run: |
642 node scripts/notify-discord-release.ts latest \
643 --role-id "$DISCORD_MENTION_ROLE_ID" \
644 --release-name "${{ needs.preflight.outputs.release_name }}" \
645 --release-version "${{ needs.preflight.outputs.version }}" \
646 --tag "${{ needs.preflight.outputs.tag }}" \
647 --release-url "https://github.com/${{ github.repository }}/releases/tag/${{ needs.preflight.outputs.tag }}"