authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-05-06 16:04:28-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-05-06 23:04:28+00:00
loga74ed8ed32c2a949ec6fc91b9ae57c25ac96359a
tree958d8e7e773cd1a00cffa6476587dab312dc8a28
parent6c79039ce752c4bc6e2f6bcac929a543e9544774
signature Signed by PGP key B5690EEEBB952194

Revert "Cache desktop build assets in CI and release workflows" (#2568)


2 files changed, 18 insertions(+), 102 deletions(-)

.github/workflows/ci.yml+4-22
......@@ -25,9 +25,8 @@ jobs:
2525 with:
2626 node-version-file: package.json
2727
28 - id: bun_turbo_cache
29 name: Restore Bun and Turbo cache
30 uses: actions/cache/restore@v5
28 - name: Cache Bun and Turbo
29 uses: actions/cache@v5
3130 with:
3231 path: |
3332 ~/.bun/install/cache
......@@ -36,9 +35,8 @@ jobs:
3635 restore-keys: |
3736 ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-
3837
39 - id: playwright_cache
40 name: Restore Playwright browsers
41 uses: actions/cache/restore@v5
38 - name: Cache Playwright browsers
39 uses: actions/cache@v5
4240 with:
4341 path: ~/.cache/ms-playwright
4442 key: ${{ runner.os }}-playwright-${{ hashFiles('bun.lock') }}
......@@ -71,22 +69,6 @@ jobs:
7169 - name: Build desktop pipeline
7270 run: bun run build:desktop
7371
74 - name: Save Playwright browsers
75 if: steps.playwright_cache.outputs.cache-hit != 'true'
76 uses: actions/cache/save@v5
77 with:
78 path: ~/.cache/ms-playwright
79 key: ${{ runner.os }}-playwright-${{ hashFiles('bun.lock') }}
80
81 - name: Save Bun and Turbo cache
82 if: steps.bun_turbo_cache.outputs.cache-hit != 'true'
83 uses: actions/cache/save@v5
84 with:
85 path: |
86 ~/.bun/install/cache
87 .turbo
88 key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}-${{ hashFiles('turbo.json') }}
89
9072 - name: Verify preload bundle output
9173 run: |
9274 test -f apps/desktop/dist-electron/preload.cjs
.github/workflows/release.yml+14-80
......@@ -311,9 +311,7 @@ jobs:
311311 shell: bash
312312 run: |
313313 set -euo pipefail
314 asset_dir="release-artifacts/desktop-${{ matrix.platform }}-${{ matrix.arch }}"
315 rm -rf "$asset_dir"
316 mkdir -p "$asset_dir"
314 mkdir -p release-publish
317315
318316 shopt -s nullglob
319317 for pattern in \
......@@ -324,13 +322,13 @@ jobs:
324322 "release/*.blockmap" \
325323 "release/*.yml"; do
326324 for file in $pattern; do
327 cp "$file" "$asset_dir"/
325 cp "$file" release-publish/
328326 done
329327 done
330328
331329 if [[ "${{ matrix.platform }}" == "mac" && "${{ matrix.arch }}" != "arm64" ]]; then
332330 shopt -s nullglob
333 for manifest in "$asset_dir"/*-mac.yml; do
331 for manifest in release-publish/*-mac.yml; do
334332 mv "$manifest" "${manifest%.yml}-${{ matrix.arch }}.yml"
335333 done
336334 fi
......@@ -342,23 +340,17 @@ jobs:
342340 # canonical manifest per channel.
343341 # if [[ "${{ matrix.platform }}" == "win" ]]; then
344342 # shopt -s nullglob
345 # for manifest in "$asset_dir"/*.yml; do
343 # for manifest in release-publish/*.yml; do
346344 # mv "$manifest" "${manifest%.yml}-win-${{ matrix.arch }}.yml"
347345 # done
348346 # fi
349347
350 assets=("$asset_dir"/*)
351 if (( ${#assets[@]} == 0 )); then
352 echo "No release assets were collected for ${{ matrix.platform }} ${{ matrix.arch }}." >&2
353 exit 1
354 fi
355
356 - name: Save build artifacts
357 uses: actions/cache/save@v5
348 - name: Upload build artifacts
349 uses: actions/upload-artifact@v7
358350 with:
359 path: release-artifacts/desktop-${{ matrix.platform }}-${{ matrix.arch }}
360 key: release-assets-${{ github.run_id }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.run_attempt }}
361 enableCrossOsArchive: true
351 name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
352 path: release-publish/*
353 if-no-files-found: error
362354
363355 publish_cli:
364356 name: Publish CLI to npm
......@@ -431,70 +423,12 @@ jobs:
431423 - name: Install dependencies
432424 run: bun install --frozen-lockfile --filter=@t3tools/scripts
433425
434 # Keep these restore steps in sync with the desktop build matrix.
435 # Cache restore cannot enumerate a key pattern like download-artifact did.
436 - name: Restore macOS arm64 desktop assets
437 uses: actions/cache/restore@v5
438 with:
439 path: release-artifacts/desktop-mac-arm64
440 key: release-assets-${{ github.run_id }}-mac-arm64-${{ github.run_attempt }}
441 restore-keys: |
442 release-assets-${{ github.run_id }}-mac-arm64-
443 fail-on-cache-miss: true
444 enableCrossOsArchive: true
445
446 - name: Restore macOS x64 desktop assets
447 uses: actions/cache/restore@v5
448 with:
449 path: release-artifacts/desktop-mac-x64
450 key: release-assets-${{ github.run_id }}-mac-x64-${{ github.run_attempt }}
451 restore-keys: |
452 release-assets-${{ github.run_id }}-mac-x64-
453 fail-on-cache-miss: true
454 enableCrossOsArchive: true
455
456 - name: Restore Linux x64 desktop assets
457 uses: actions/cache/restore@v5
426 - name: Download all desktop artifacts
427 uses: actions/download-artifact@v8
458428 with:
459 path: release-artifacts/desktop-linux-x64
460 key: release-assets-${{ github.run_id }}-linux-x64-${{ github.run_attempt }}
461 restore-keys: |
462 release-assets-${{ github.run_id }}-linux-x64-
463 fail-on-cache-miss: true
464 enableCrossOsArchive: true
465
466 - name: Restore Windows x64 desktop assets
467 uses: actions/cache/restore@v5
468 with:
469 path: release-artifacts/desktop-win-x64
470 key: release-assets-${{ github.run_id }}-win-x64-${{ github.run_attempt }}
471 restore-keys: |
472 release-assets-${{ github.run_id }}-win-x64-
473 fail-on-cache-miss: true
474 enableCrossOsArchive: true
475
476 - name: Stage desktop assets
477 shell: bash
478 run: |
479 set -euo pipefail
480 rm -rf release-assets
481 mkdir -p release-assets
482
483 shopt -s nullglob
484 for dir in release-artifacts/desktop-*; do
485 files=("$dir"/*)
486 if (( ${#files[@]} == 0 )); then
487 echo "No release assets were restored from $dir." >&2
488 exit 1
489 fi
490 cp "${files[@]}" release-assets/
491 done
492
493 assets=(release-assets/*)
494 if (( ${#assets[@]} == 0 )); then
495 echo "No desktop release assets were staged." >&2
496 exit 1
497 fi
429 pattern: desktop-*
430 merge-multiple: true
431 path: release-assets
498432
499433 - name: Merge macOS updater manifests
500434 run: |