Skip to content

Commit 83febc3

Browse files
JohnMcLearclaude
andcommitted
ci: do the git commit + tag explicitly, not via \pnpm version patch\
pnpm/action-setup@v6 + \`version: 10.x\` was still installing a \`11.0.0-beta\` pre-release on the runner (upstream pnpm/action-setup#225). That pre-release's \`pnpm version patch\` bumps \`package.json\` but silently omits both the git commit and the tag, so the subsequent \`git push --atomic <branch> vX.Y.Z\` failed with: Version bumped successfully: ep_headings2: 0.2.108 → 0.2.109 error: src refspec v0.2.109 does not match any Stop relying on pnpm to do the commit/tag. Use \`pnpm version patch --no-git-tag-version --no-commit-hooks\` purely to bump the number in package.json, then \`git add\`, \`git commit\`, and \`git tag -a\` ourselves. Robust across pnpm versions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 33fbb3c commit 83febc3

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/npmpublish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,16 @@ jobs:
6060
git config user.name 'github-actions[bot]'
6161
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
6262
pnpm i --frozen-lockfile
63-
# `pnpm version patch` bumps package.json, makes a commit, and creates
64-
# a `v<new-version>` tag. Capture the new tag name from package.json
65-
# rather than parsing pnpm's output, which has historically varied.
66-
pnpm version patch
63+
# pnpm's `version patch` silently stopped creating the git tag on
64+
# some pnpm pre-release channels that pnpm/action-setup@v6 ends
65+
# up installing even when `version: 10.x` is requested
66+
# (see pnpm/action-setup#225). Do the bump ourselves so the tag
67+
# is always created.
68+
pnpm version patch --no-git-tag-version --no-commit-hooks
6769
NEW_TAG="v$(node -p "require('./package.json').version")"
70+
git add package.json pnpm-lock.yaml
71+
git commit -m "${NEW_TAG}"
72+
git tag -a "${NEW_TAG}" -m "${NEW_TAG}"
6873
# CRITICAL: use --atomic so the branch update and the tag update
6974
# succeed (or fail) as a single transaction on the server. The old
7075
# `git push --follow-tags` was non-atomic per ref: if a concurrent

0 commit comments

Comments
 (0)