Repository navigation
ci: set cache-mode on release workflows - #306
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
dsanders11
approved these changes
Sep 18, 2026
dsanders11
marked this pull request as ready for review
September 18, 2026 22:39
MarshallOfSound
enabled auto-merge (squash)
October 6, 2026 22:25
MarshallOfSound
approved these changes
Oct 6, 2026
|
🎉 This PR is included in version 4.37.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by David Sanders · Slack thread
Before: Whether a release run touched the GitHub Actions cache depended on per-step configuration. The
Releaseworkflow (push tomain/3-x-y) has no explicit cache opt-out on itssetup-nodestep, and thetestjob it calls viauses: ./.github/workflows/test.ymlruns with whatever cache settingstest.ymlhas. Nothing enforced a "no cache on release" intent at the workflow level, so a step or action that restored a cache entry during a publish would silently be allowed.After: The
Releaseworkflow declarescache-mode: noneat the top level, so every job in a release run — including thetestjobs pulled in fromtest.ymlviauses:— is denied cache access by the runner regardless of what individual steps or actions ask for. A denied cache restore logs a message and continues as a cache miss; a denied cache save logs and becomes a no-op, so the release does not fail because of this setting. PR CI (test.ymlon its own triggers) is untouched and keeps caching as before.GitHub's new workflow-level
cache-modekey makes this a declarative, enforced setting rather than a convention (see changelog and workflow syntax reference), which closes the cache-poisoning avenue on the path that publishes to npm.How: Adds
cache-mode: none(with a one-line comment) directly after the top-levelpermissions: {}block in.github/workflows/release.yml. No other lines changed. The file parses as YAML and zizmor 1.30.1 accepts the new key with no new findings. Note that PR CI does not exercise the release workflow, so the first push tomainthat triggers a semantic release after merge is the real test of this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Generated by Claude Code