Skip to content

ci: set cache-mode on release workflows - #163

Draft
claude[bot] wants to merge 1 commit into
mainfrom
ci/cache-mode
Draft

claude[bot] wants to merge 1 commit into
mainfrom
ci/cache-mode

Conversation

@claude

@claude claude Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Requested by David Sanders · Slack thread

Before: A push to main runs the Release workflow, which calls test.yml and build.yml via uses: and then publishes to npm. The release job itself already opts out of the setup-node package-manager cache (package-manager-cache: false), but nothing prevents a step in the release run from reading or writing the GitHub Actions cache, and the called test/build jobs still use cache: "yarn" in actions/setup-node.

After: The Release workflow declares cache-mode: none at the top level, so no job in a release run can read from or write to the Actions cache. Because the setting is on the caller, it also caps the test.yml and build.yml jobs it calls during release runs: their cache: "yarn" restore/save steps are skipped (treated as a cache miss / no-op) and they install from the registry instead. PR CI runs of test.yml/build.yml are unchanged and keep caching.

This uses GitHub's new workflow-level cache-mode key (changelog, syntax reference) to make release paths independent of cache contents, enforced regardless of per-step settings.

How: Adds cache-mode: none (with a one-line comment) directly after the top-level permissions: {} block in .github/workflows/release.yml. No other files are touched; the existing package-manager-cache: false line stays.

Note that PR CI does not exercise the release workflow, so the first release after merge is the real test. A cache step that is denied by cache-mode logs a message and continues rather than failing the job.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd


Generated by Claude Code

Add top-level `cache-mode: none` to release.yml so the release run
(and the test/build workflows it calls via `uses:`) never reads from
or writes to the GitHub Actions cache.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant