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

release-desktop.yml

528 lines22.1 KB

1name: Release desktop build
2​
3# One desktop platform/arch build, called once per target from release.yml so
4# each target is its own job with its own `needs`. The JS bundle (server, web
5# client, Electron main) comes from the `js-bundle` artifact that build_bundle
6# produced; this job only packages it, builds the native helpers, and, where
7# `cli_archive` is set, the self-contained CLI archive for its platform.
8​
9on:
10 workflow_call:
11 inputs:
12 label:
13 required: true
14 type: string
15 runner:
16 required: true
17 type: string
18 platform:
19 required: true
20 type: string
21 target:
22 required: true
23 type: string
24 arch:
25 required: true
26 type: string
27 rust_target:
28 required: true
29 type: string
30 resource_key:
31 required: true
32 type: string
33 # Whether the job also builds the self-contained CLI archive for its own
34 # platform/arch, on this runner, and smoke-tests it here. Every archive
35 # is built on hardware of its own architecture.
36 cli_archive:
37 required: false
38 default: false
39 type: boolean
40 version:
41 required: true
42 type: string
43 ref:
44 required: true
45 type: string
46 release_channel:
47 required: true
48 type: string
49 clerk_publishable_key:
50 required: true
51 type: string
52 clerk_jwt_template:
53 required: true
54 type: string
55 clerk_cli_oauth_client_id:
56 required: true
57 type: string
58 relay_url:
59 required: true
60 type: string
61​
62permissions:
63 contents: read
64​
65jobs:
66 build:
67 name: Build ${{ inputs.label }}
68 runs-on: ${{ inputs.runner }}
69 timeout-minutes: 30
70 env:
71 T3CODE_CLERK_PUBLISHABLE_KEY: ${{ inputs.clerk_publishable_key }}
72 T3CODE_CLERK_JWT_TEMPLATE: ${{ inputs.clerk_jwt_template }}
73 T3CODE_CLERK_CLI_OAUTH_CLIENT_ID: ${{ inputs.clerk_cli_oauth_client_id }}
74 T3CODE_RELAY_URL: ${{ inputs.relay_url }}
75 steps:
76 - name: Checkout
77 uses: actions/checkout@v6
78 with:
79 ref: ${{ inputs.ref }}
80 sparse-checkout: |
81 /*
82 !/.repos/
83 sparse-checkout-cone-mode: false
84​
85 - name: Setup Vite+
86 uses: voidzero-dev/setup-vp@v1
87 with:
88 node-version-file: package.json
89 cache: ${{ inputs.platform != 'win' }}
90 run-install: false
91​
92 - name: Resolve Windows package cache path
93 if: inputs.platform == 'win'
94 id: package_cache_path
95 shell: pwsh
96 run: '"path=$(vp pm cache dir)" >> $env:GITHUB_OUTPUT'
97​
98 - name: Cache Windows packages
99 if: inputs.platform == 'win'
100 uses: actions/cache@v6
101 with:
102 path: ${{ steps.package_cache_path.outputs.path }}
103 key: windows-release-packages-v1-${{ inputs.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
104​
105 # pnpm checks the lockfile and policy before reusing this result. A missing
106 # artifact leaves the cache empty, so installation runs the checks again.
107 - name: Download dependency verification
108 continue-on-error: true
109 uses: actions/download-artifact@v8
110 with:
111 name: release-dependency-verification
112 path: ${{ runner.temp }}/pnpm-metadata
113​
114 - name: Install desktop dependencies
115 env:
116 pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
117 run: vp install --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
118​
119 - name: Cache resource monitor
120 id: resource_monitor_cache
121 uses: actions/cache@v6
122 with:
123 path: native/resource-monitor/target/${{ inputs.rust_target }}/release/t3-resource-monitor${{ inputs.platform == 'win' && '.exe' || '' }}
124 key: resource-monitor-${{ inputs.rust_target }}-${{ hashFiles('native/resource-monitor/Cargo.lock', 'native/resource-monitor/Cargo.toml', 'native/resource-monitor/src/**') }}
125​
126 - name: Cache Linux capture helpers
127 if: inputs.platform == 'linux'
128 id: capture_helper_cache
129 uses: actions/cache@v6
130 with:
131 path: |
132 native/kde-snap-shot/target/${{ inputs.rust_target }}/release/t3-kde-snap-shot
133 native/hyprland-snap-shot/target/${{ inputs.rust_target }}/release/t3-hyprland-snap-shot
134 key: linux-capture-helpers-${{ inputs.rust_target }}-${{ hashFiles('native/kde-snap-shot/Cargo.lock', 'native/kde-snap-shot/Cargo.toml', 'native/kde-snap-shot/src/**', 'native/hyprland-snap-shot/Cargo.lock', 'native/hyprland-snap-shot/Cargo.toml', 'native/hyprland-snap-shot/src/**', 'native/hyprland-snap-shot/protocols/**') }}
135​
136 - name: Setup Rust
137 if: steps.resource_monitor_cache.outputs.cache-hit != 'true' || (inputs.platform == 'linux' && steps.capture_helper_cache.outputs.cache-hit != 'true')
138 uses: dtolnay/rust-toolchain@stable
139 with:
140 targets: ${{ inputs.rust_target }}
141​
142 - name: Download relay client tracing config
143 uses: actions/download-artifact@v8
144 with:
145 name: relay-client-tracing-config
146 path: ${{ runner.temp }}/relay-client-tracing
147​
148 - name: Load relay client tracing config
149 shell: bash
150 run: |
151 config_path="$RUNNER_TEMP/relay-client-tracing/relay-client-tracing.env"
152 tracing_token="$(sed -n 's/^T3CODE_RELAY_CLIENT_OTLP_TRACES_TOKEN=//p' "$config_path")"
153 echo "::add-mask::$tracing_token"
154 cat "$config_path" >> "$GITHUB_ENV"
155​
156 - name: Align package versions to release version
157 run: node scripts/update-release-package-versions.ts "${{ inputs.version }}"
158​
159 # The artifact root is `apps/` (upload-artifact keeps the least common
160 # ancestor of its paths), so extracting into `apps` restores
161 # apps/server/dist and apps/desktop/dist-electron at their build paths.
162 - name: Download JS bundle
163 uses: actions/download-artifact@v8
164 with:
165 name: js-bundle
166 path: apps
167​
168 # The WSL backend runs the Linux CLI archive inside the distro, so the
169 # Windows desktop embeds the same-arch archive the release attaches.
170 - name: Download Linux CLI archive for WSL
171 if: inputs.platform == 'win'
172 uses: actions/download-artifact@v8
173 with:
174 name: cli-linux-${{ inputs.arch }}
175 path: wsl-runtime
176​
177 - name: Install Spectre-mitigated MSVC libs
178 if: inputs.platform == 'win'
179 shell: pwsh
180 run: |
181 $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
182 $installPath = & $vswhere -products * -latest -property installationPath
183 $setupExe = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
184 $proc = Start-Process -FilePath $setupExe `
185 -ArgumentList "modify", "--installPath", "`"$installPath`"", "--add", `
186 "Microsoft.VisualStudio.Component.VC.Runtimes.${{ inputs.arch == 'arm64' && 'ARM64' || 'x86.x64' }}.Spectre", "--quiet", "--norestart" `
187 -Wait -PassThru -NoNewWindow
188 if ($null -eq $proc -or $proc.ExitCode -ne 0) {
189 $code = if ($null -ne $proc) { $proc.ExitCode } else { 1 }
190 Write-Error "Visual Studio Installer failed with exit code $code"
191 exit $code
192 }
193​
194 - uses: ./.github/actions/setup-apt-mirrors
195 if: inputs.platform == 'linux'
196​
197 - name: Install Linux desktop build libraries
198 if: inputs.platform == 'linux'
199 shell: bash
200 run: |
201 sudo apt-get update
202 sudo apt-get install -y libsecret-1-dev pkg-config
203 if ! command -v magick >/dev/null 2>&1 && ! command -v convert >/dev/null 2>&1; then
204 sudo apt-get install -y imagemagick
205 fi
206​
207 if command -v magick >/dev/null 2>&1; then
208 magick -version
209 else
210 convert -version
211 fi
212​
213 - name: Prepare Azure Trusted Signing
214 if: inputs.platform == 'win'
215 shell: pwsh
216 env:
217 AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
218 AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
219 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
220 AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
221 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
222 AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
223 AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
224 run: |
225 $ErrorActionPreference = "Stop"
226​
227 $requiredSecrets = @(
228 $env:AZURE_TENANT_ID,
229 $env:AZURE_CLIENT_ID,
230 $env:AZURE_CLIENT_SECRET,
231 $env:AZURE_TRUSTED_SIGNING_ENDPOINT,
232 $env:AZURE_TRUSTED_SIGNING_ACCOUNT_NAME,
233 $env:AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME,
234 $env:AZURE_TRUSTED_SIGNING_PUBLISHER_NAME
235 )
236 if ($requiredSecrets | Where-Object { [string]::IsNullOrWhiteSpace($_) }) {
237 Write-Host "Azure Trusted Signing disabled; skipping TrustedSigning module preparation."
238 exit 0
239 }
240​
241 try {
242 Install-PackageProvider `
243 -Name NuGet `
244 -MinimumVersion 2.8.5.201 `
245 -Force `
246 -Scope CurrentUser `
247 -ErrorAction Stop
248 } catch {
249 Write-Warning "Could not bootstrap NuGet package provider. Continuing because the runner may already have a usable provider. $($_.Exception.Message)"
250 }
251​
252 Install-Module `
253 -Name TrustedSigning `
254 -MinimumVersion 0.5.0 `
255 -Force `
256 -AllowClobber `
257 -Repository PSGallery `
258 -Scope CurrentUser `
259 -ErrorAction Stop
260​
261 Import-Module TrustedSigning -MinimumVersion 0.5.0 -Force
262 Get-Command Invoke-TrustedSigning -ErrorAction Stop
263​
264 $moduleRoots = @(
265 [System.IO.Path]::Combine([Environment]::GetFolderPath("MyDocuments"), "PowerShell", "Modules"),
266 [System.IO.Path]::Combine([Environment]::GetFolderPath("MyDocuments"), "WindowsPowerShell", "Modules"),
267 [System.IO.Path]::Combine($env:ProgramFiles, "PowerShell", "Modules"),
268 [System.IO.Path]::Combine($env:ProgramFiles, "WindowsPowerShell", "Modules")
269 )
270 $modulePathEntries = @($moduleRoots + ($env:PSModulePath -split ";")) |
271 Where-Object { $_ -and (Test-Path $_) } |
272 Select-Object -Unique
273 "PSModulePath=$($modulePathEntries -join ';')" >> $env:GITHUB_ENV
274​
275 - name: Build desktop artifact
276 shell: bash
277 env:
278 pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
279 T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR: ${{ steps.resource_monitor_cache.outputs.cache-hit == 'true' }}
280 T3CODE_DESKTOP_REUSE_LINUX_CAPTURE_HELPERS: ${{ steps.capture_helper_cache.outputs.cache-hit == 'true' }}
281 CSC_LINK: ${{ secrets.CSC_LINK }}
282 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
283 APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
284 APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
285 APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
286 APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
287 MACOS_PROVISIONING_PROFILE: ${{ secrets.MACOS_PROVISIONING_PROFILE }}
288 T3CODE_CLERK_PASSKEY_RP_DOMAINS: ${{ vars.CLERK_PASSKEY_RP_DOMAINS }}
289 AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
290 AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
291 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
292 AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
293 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
294 AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
295 AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
296 run: |
297 args=(
298 --platform "${{ inputs.platform }}"
299 --target "${{ inputs.target }}"
300 --arch "${{ inputs.arch }}"
301 --build-version "${{ inputs.version }}"
302 --skip-build
303 --verbose
304 )
305​
306 has_all() {
307 for value in "$@"; do
308 if [[ -z "$value" ]]; then
309 return 1
310 fi
311 done
312 return 0
313 }
314​
315 if [[ "${{ inputs.platform }}" == "mac" ]]; then
316 if has_all "$CSC_LINK" "$CSC_KEY_PASSWORD" "$APPLE_API_KEY" "$APPLE_API_KEY_ID" "$APPLE_API_ISSUER"; then
317 if ! has_all "$APPLE_TEAM_ID" "$MACOS_PROVISIONING_PROFILE"; then
318 echo "macOS signing is configured, but APPLE_TEAM_ID or MACOS_PROVISIONING_PROFILE is missing." >&2
319 exit 1
320 fi
321​
322 key_path="$RUNNER_TEMP/AuthKey_${APPLE_API_KEY_ID}.p8"
323 printf '%s' "$APPLE_API_KEY" > "$key_path"
324 export APPLE_API_KEY="$key_path"
325​
326 profile_path="$RUNNER_TEMP/t3code.provisionprofile"
327 printf '%s' "$MACOS_PROVISIONING_PROFILE" | base64 -D > "$profile_path"
328 security cms -D -i "$profile_path" >/dev/null
329 export T3CODE_APPLE_TEAM_ID="$APPLE_TEAM_ID"
330 export T3CODE_MACOS_PROVISIONING_PROFILE="$profile_path"
331​
332 echo "macOS signing enabled."
333 args+=(--signed)
334 else
335 echo "macOS signing disabled (missing one or more Apple signing secrets)."
336 fi
337 elif [[ "${{ inputs.platform }}" == "win" ]]; then
338 # Embed the Linux CLI archive built by the same-arch Linux job as
339 # the WSL runtime. Required for a working WSL backend on Windows.
340 args+=(--wsl-runtime "$GITHUB_WORKSPACE"/wsl-runtime/t3-*-linux-${{ inputs.arch }}.tar.gz)
341 if has_all \
342 "$AZURE_TENANT_ID" \
343 "$AZURE_CLIENT_ID" \
344 "$AZURE_CLIENT_SECRET" \
345 "$AZURE_TRUSTED_SIGNING_ENDPOINT" \
346 "$AZURE_TRUSTED_SIGNING_ACCOUNT_NAME" \
347 "$AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME" \
348 "$AZURE_TRUSTED_SIGNING_PUBLISHER_NAME"; then
349 echo "Windows signing enabled (Azure Trusted Signing)."
350 args+=(--signed)
351 else
352 echo "Windows signing disabled (missing one or more Azure Trusted Signing secrets)."
353 fi
354 else
355 echo "Signing disabled for ${{ inputs.platform }}."
356 fi
357​
358 vp run dist:desktop:artifact "${args[@]}"
359​
360 # The single-executable is built with a Node that supports --build-sea
361 # (25.7+); the repo itself stays on the engines.node version. It always
362 # injects into the runner's own Node: tsdown's cross-target download path
363 # runs `tar` on a drive-letter path on Windows, which GNU tar reads as a
364 # remote host, and a cross-built macOS binary cannot be smoke-tested.
365 - name: Build CLI single-executable
366 if: inputs.cli_archive
367 shell: bash
368 env:
369 # The exact version, not a major: vp downloads it from nodejs.org/dist on
370 # the runner, and only exact versions have a dist directory. Keep in
371 # step with SEA_NODE_VERSION in apps/server/vite.config.ts.
372 VP_NODE_VERSION: "26.8.2"
373 run: node apps/server/scripts/cli.ts build-exe --verbose
374​
375 - name: Import macOS signing certificate for the CLI archive
376 if: inputs.cli_archive && inputs.platform == 'mac'
377 shell: bash
378 env:
379 CSC_LINK: ${{ secrets.CSC_LINK }}
380 CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
381 run: |
382 set -euo pipefail
383 if [[ -z "$CSC_LINK" || -z "$CSC_KEY_PASSWORD" ]]; then
384 echo "macOS CLI signing disabled (missing CSC_LINK); the archive is signed ad hoc."
385 exit 0
386 fi
387 keychain="$RUNNER_TEMP/t3-cli-signing.keychain-db"
388 keychain_password="$(openssl rand -hex 16)"
389 cert_path="$RUNNER_TEMP/t3-cli-signing.p12"
390 printf '%s' "$CSC_LINK" | base64 --decode > "$cert_path"
391 security create-keychain -p "$keychain_password" "$keychain"
392 security set-keychain-settings -lut 21600 "$keychain"
393 security unlock-keychain -p "$keychain_password" "$keychain"
394 security import "$cert_path" -k "$keychain" -P "$CSC_KEY_PASSWORD" -T /usr/bin/codesign
395 security set-key-partition-list -S apple-tool:,apple: -s -k "$keychain_password" "$keychain" >/dev/null
396 security list-keychains -d user -s "$keychain" $(security list-keychains -d user | tr -d '"')
397 identity="$(security find-identity -v -p codesigning "$keychain" | sed -n 's/.*"\(Developer ID Application: [^"]*\)".*/\1/p' | head -n 1)"
398 if [[ -z "$identity" ]]; then
399 echo "No Developer ID Application identity found in CSC_LINK." >&2
400 exit 1
401 fi
402 echo "::add-mask::$keychain_password"
403 echo "T3CODE_CLI_MAC_SIGN_IDENTITY=$identity" >> "$GITHUB_ENV"
404 echo "macOS CLI signing enabled."
405​
406 - name: Stage resource monitor for the CLI archive
407 if: inputs.cli_archive
408 shell: bash
409 run: |
410 set -euo pipefail
411 binary_name="t3-resource-monitor"
412 if [[ "${{ inputs.platform }}" == "win" ]]; then
413 binary_name="${binary_name}.exe"
414 fi
415 target_dir="$RUNNER_TEMP/cli-resource-monitor/${{ inputs.resource_key }}"
416 mkdir -p "$target_dir"
417 cp "native/resource-monitor/target/${{ inputs.rust_target }}/release/${binary_name}" "$target_dir/$binary_name"
418​
419 - name: Build CLI archive
420 if: inputs.cli_archive
421 shell: bash
422 env:
423 APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
424 APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
425 APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
426 AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
427 AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
428 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
429 AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
430 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
431 AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
432 run: |
433 set -euo pipefail
434 if [[ "${{ inputs.platform }}" == "mac" && -n "${APPLE_API_KEY:-}" ]]; then
435 key_path="$RUNNER_TEMP/AuthKey_cli_${APPLE_API_KEY_ID}.p8"
436 printf '%s' "$APPLE_API_KEY" > "$key_path"
437 export APPLE_API_KEY="$key_path"
438 fi
439 node scripts/build-cli-archive.ts \
440 --platform "${{ inputs.platform }}" \
441 --arch "${{ inputs.arch }}" \
442 --version "${{ inputs.version }}" \
443 --resource-monitor-dir "$RUNNER_TEMP/cli-resource-monitor" \
444 --output-dir release-cli
445​
446 - name: Smoke-test CLI archive
447 if: inputs.cli_archive
448 shell: bash
449 run: node scripts/smoke-cli-archive.ts --archive release-cli/* --expect-version "${{ inputs.version }}"
450​
451 - name: Upload CLI archive
452 if: inputs.cli_archive
453 uses: actions/upload-artifact@v7
454 with:
455 name: cli-${{ inputs.platform }}-${{ inputs.arch }}
456 path: release-cli/*
457 if-no-files-found: error
458​
459 - name: Collect release assets
460 shell: bash
461 run: |
462 set -euo pipefail
463 mkdir -p release-publish
464​
465 shopt -s nullglob
466 patterns=(
467 "release/*.dmg"
468 "release/*.zip"
469 "release/*.AppImage"
470 "release/*.exe"
471 )
472 # Preview builds have no publish config, so electron-builder writes
473 # no feed manifest for them, but it still emits blockmaps beside the
474 # installers. Neither belongs on a release no updater may follow.
475 if [[ "${{ inputs.release_channel }}" != "preview" ]]; then
476 patterns+=("release/*.blockmap" "release/*.yml")
477 fi
478 for pattern in "${patterns[@]}"; do
479 for file in $pattern; do
480 cp "$file" release-publish/
481 done
482 done
483​
484 if [[ "${{ inputs.platform }}" == "mac" && "${{ inputs.arch }}" != "arm64" ]]; then
485 shopt -s nullglob
486 for manifest in release-publish/*-mac.yml; do
487 mv "$manifest" "${manifest%.yml}-${{ inputs.arch }}.yml"
488 done
489 fi
490​
491 # Windows updater metadata is channel-specific (for example
492 # "latest.yml" or "nightly.yml") and carries no arch, so the x64 and
493 # arm64 jobs would upload the same name. Suffix each per-arch copy;
494 # the release job merges them back into one manifest per channel.
495 # builder-debug.yml is electron-builder's config dump, not a feed.
496 if [[ "${{ inputs.platform }}" == "win" ]]; then
497 for manifest in release-publish/*.yml; do
498 [[ "$manifest" == */builder-debug.yml ]] && continue
499 mv "$manifest" "${manifest%.yml}-win-${{ inputs.arch }}.yml"
500 done
501 fi
502​
503 - name: Collect resource monitor
504 shell: bash
505 run: |
506 set -euo pipefail
507 binary_name="t3-resource-monitor"
508 if [[ "${{ inputs.platform }}" == "win" ]]; then
509 binary_name="${binary_name}.exe"
510 fi
511 source_path="native/resource-monitor/target/${{ inputs.rust_target }}/release/${binary_name}"
512 target_dir="resource-monitor-publish/${{ inputs.resource_key }}"
513 mkdir -p "$target_dir"
514 cp "$source_path" "$target_dir/$binary_name"
515​
516 - name: Upload build artifacts
517 uses: actions/upload-artifact@v7
518 with:
519 name: desktop-${{ inputs.platform }}-${{ inputs.arch }}
520 path: release-publish/*
521 if-no-files-found: error
522​
523 - name: Upload resource monitor
524 uses: actions/upload-artifact@v7
525 with:
526 name: resource-monitor-${{ inputs.resource_key }}
527 path: resource-monitor-publish/${{ inputs.resource_key }}/*
528 if-no-files-found: error