ci(release): enable Corepack before setup-node so pnpm cache resolves - #1037
Merged
Merged
Conversation
setup-node's `cache: pnpm` needs pnpm on PATH when it runs; moving
`corepack enable` after setup-node broke it ("Unable to locate
executable file: pnpm"). Corepack doesn't touch npm, so enabling it
first is safe and the npm upgrade still runs after setup-node.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DEmbohrunFJi7Ld22FNFpL
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.
Why
Follow-up to #1035. That PR reordered the publish job so the npm upgrade runs after
setup-node, but it movedcorepack enableto aftersetup-nodetoo — andsetup-nodehascache: 'pnpm', which needspnpmonPATHat that moment. Result: the publish job died in the Setup Node.js step with:Fix
Move
corepack enableback to beforesetup-node(it provides thepnpmshim the cache step needs). Corepack doesn't touch npm, so the npm upgrade still runs aftersetup-nodeand still sticks. Net step order in the publish job:Enable Corepack→Setup Node.js (cache: pnpm)→Upgrade npm→Verify npm ≥ 11.5.1→ install → build → publish.Verified
This exact fix was smoke-tested end-to-end by publishing
@iloom/cli@0.14.4-beta.0under thebetadist-tag via OIDC trusted publishing (workflow dispatch on a temp branch). The publish succeeded with a signed provenance statement:Provenance is only emitted by OIDC trusted publishing — so this confirms both the corepack fix and that tokenless OIDC publishing works.
latestwas untouched (still 0.14.3).🤖 Generated with Claude Code