Skip to content

Cache desktop build assets in CI and release workflows#2543

Merged
juliusmarminge merged 2 commits intomainfrom
t3code/blacksmith-artifact-cache
May 6, 2026
Merged

Cache desktop build assets in CI and release workflows#2543
juliusmarminge merged 2 commits intomainfrom
t3code/blacksmith-artifact-cache

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented May 6, 2026

Summary

  • Switch CI to split Bun/Turbo and Playwright caches into restore/save steps for better cache reuse.
  • Replace desktop artifact uploads in the release workflow with cached per-platform asset bundles.
  • Add explicit staging and validation steps when collecting release assets to fail fast on missing outputs.
  • Update the release publish job to restore platform-specific desktop assets before merging updater manifests.

Testing

  • Not run (workflow-only changes).
  • Verified the release workflow now stages assets from release-artifacts/desktop-* before publishing.
  • Verified CI and release cache keys are scoped by platform/arch and run metadata to avoid collisions.

Note

Medium Risk
Release pipeline now depends on Actions cache entries (restore/save + cross-OS archives) instead of uploaded artifacts, so cache misses/evictions or key mismatches could break publishing. Changes are workflow-only but affect critical build/release automation.

Overview
Improves CI caching behavior by splitting Bun/Turbo and Playwright caches into explicit actions/cache/restore + conditional actions/cache/save steps, saving only on cache miss.

Changes release asset handoff by replacing upload-artifact/download-artifact with per-platform/arch cached bundles (release-artifacts/desktop-*) keyed by run metadata, then explicitly restoring and staging them into release-assets with fail-fast validation before publishing/merging manifests.

Reviewed by Cursor Bugbot for commit 2319620. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Cache desktop build assets in CI and release workflows

  • Splits actions/cache into separate restore and conditional save steps in ci.yml for Bun/Turbo and Playwright caches, so saves only occur on cache misses.
  • In release.yml, replaces actions/upload-artifact with actions/cache/save for desktop build artifacts, writing outputs to per-matrix directories keyed by run ID, platform, arch, and attempt.
  • The publish_cli job now restores each platform's cache explicitly with fail-on-cache-miss: true, then stages all assets into a flat release-assets directory with validation that no directory is empty.
  • Behavioral Change: artifact storage for desktop builds moves from GitHub artifact uploads to the Actions cache; any workflow that previously relied on download-artifact for these assets will no longer find them.

Macroscope summarized 2319620.

- Use actions/cache restore/save for Bun, Turbo, Playwright, and desktop artifacts
- Stage per-platform release assets before publishing
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1effadf2-60b1-4e7b-beae-ef62600d27ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/blacksmith-artifact-cache

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels May 6, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Cross-OS cache restore fails without enableCrossOsArchive
    • Added enableCrossOsArchive: true to the cache/save step in the build job and all four cache/restore steps in the release job, ensuring the runner OS is excluded from the cache version hash and cross-OS cache lookups succeed.

Create PR

Or push these changes by commenting:

@cursor push 5ff99450c1
Preview (5ff99450c1)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -358,6 +358,7 @@
         with:
           path: release-artifacts/desktop-${{ matrix.platform }}-${{ matrix.arch }}
           key: release-assets-${{ github.run_id }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.run_attempt }}
+          enableCrossOsArchive: true
 
   publish_cli:
     name: Publish CLI to npm
@@ -440,6 +441,7 @@
           restore-keys: |
             release-assets-${{ github.run_id }}-mac-arm64-
           fail-on-cache-miss: true
+          enableCrossOsArchive: true
 
       - name: Restore macOS x64 desktop assets
         uses: actions/cache/restore@v5
@@ -449,6 +451,7 @@
           restore-keys: |
             release-assets-${{ github.run_id }}-mac-x64-
           fail-on-cache-miss: true
+          enableCrossOsArchive: true
 
       - name: Restore Linux x64 desktop assets
         uses: actions/cache/restore@v5
@@ -458,6 +461,7 @@
           restore-keys: |
             release-assets-${{ github.run_id }}-linux-x64-
           fail-on-cache-miss: true
+          enableCrossOsArchive: true
 
       - name: Restore Windows x64 desktop assets
         uses: actions/cache/restore@v5
@@ -467,6 +471,7 @@
           restore-keys: |
             release-assets-${{ github.run_id }}-win-x64-
           fail-on-cache-miss: true
+          enableCrossOsArchive: true
 
       - name: Stage desktop assets
         shell: bash

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit a2460de. Configure here.

Comment thread .github/workflows/release.yml
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 6, 2026

Approvability

Verdict: Approved

Changes are limited to CI/CD workflow files, optimizing how desktop build artifacts are cached between jobs. No runtime code is affected, and the modifications follow standard GitHub Actions caching patterns with added validation checks.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
Copy link
Copy Markdown
Member Author

@cursor push 5ff9945

…fact 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.

Applied via @cursor push command
@juliusmarminge juliusmarminge merged commit 6c79039 into main May 6, 2026
12 checks passed
@juliusmarminge juliusmarminge deleted the t3code/blacksmith-artifact-cache branch May 6, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants