Skip to content

Commit 6fe2c55

Browse files
JohnMcLearclaude
andcommitted
ci: use --frozen-lockfile in the publish version bump
The publish workflow ran a plain `pnpm i` before `pnpm version patch`. If the lockfile was even slightly out of sync with package.json (easy to happen when a dependency bump is merged via PR), that install updated pnpm-lock.yaml and left the working tree dirty. `pnpm version patch` silently declines to create a git tag in a dirty tree but still writes the new version into package.json, and the subsequent `git push --atomic <branch> vX.Y.Z` fails with: error: src refspec vX.Y.Z does not match any — blocking the publish. Using `--frozen-lockfile` keeps the tree clean; if the lockfile really is out of sync, the install fails loudly (which is what we want — the fix is to update the lockfile in a PR, not silently during publish). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent edb9029 commit 6fe2c55

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
[ "${NEW_COMMITS}" -gt 0 ] || exit 0
6060
git config user.name 'github-actions[bot]'
6161
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
62-
pnpm i
62+
pnpm i --frozen-lockfile
6363
# `pnpm version patch` bumps package.json, makes a commit, and creates
6464
# a `v<new-version>` tag. Capture the new tag name from package.json
6565
# rather than parsing pnpm's output, which has historically varied.

0 commit comments

Comments
 (0)