Skip to content

Commit 5ff9945

Browse files
committed
fix: add enableCrossOsArchive to cache save/restore for cross-OS artifact transfer
The build jobs save caches on macOS and Windows runners, but the release job restores them on a Linux runner. actions/cache includes runner.os in its internal version hash by default, making caches from other OSes invisible even when the user-specified key matches. Adding enableCrossOsArchive: true on both cache/save and cache/restore steps ensures the OS is excluded from the version hash, allowing cross-OS cache lookup to succeed.
1 parent a2460de commit 5ff9945

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ jobs:
358358
with:
359359
path: release-artifacts/desktop-${{ matrix.platform }}-${{ matrix.arch }}
360360
key: release-assets-${{ github.run_id }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.run_attempt }}
361+
enableCrossOsArchive: true
361362

362363
publish_cli:
363364
name: Publish CLI to npm
@@ -440,6 +441,7 @@ jobs:
440441
restore-keys: |
441442
release-assets-${{ github.run_id }}-mac-arm64-
442443
fail-on-cache-miss: true
444+
enableCrossOsArchive: true
443445

444446
- name: Restore macOS x64 desktop assets
445447
uses: actions/cache/restore@v5
@@ -449,6 +451,7 @@ jobs:
449451
restore-keys: |
450452
release-assets-${{ github.run_id }}-mac-x64-
451453
fail-on-cache-miss: true
454+
enableCrossOsArchive: true
452455

453456
- name: Restore Linux x64 desktop assets
454457
uses: actions/cache/restore@v5
@@ -458,6 +461,7 @@ jobs:
458461
restore-keys: |
459462
release-assets-${{ github.run_id }}-linux-x64-
460463
fail-on-cache-miss: true
464+
enableCrossOsArchive: true
461465

462466
- name: Restore Windows x64 desktop assets
463467
uses: actions/cache/restore@v5
@@ -467,6 +471,7 @@ jobs:
467471
restore-keys: |
468472
release-assets-${{ github.run_id }}-win-x64-
469473
fail-on-cache-miss: true
474+
enableCrossOsArchive: true
470475

471476
- name: Stage desktop assets
472477
shell: bash

0 commit comments

Comments
 (0)