Skip to content

Commit 467da64

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
fix: skip npm version patch when package.json already matches tag (#364)
npm version errors with "Version not changed" when the version in package.json already matches the tag version. Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3e7f1cd commit 467da64

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/vscode-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ jobs:
8787
echo "Tag '$GITHUB_REF_NAME' does not produce a valid semver: '$VERSION'"
8888
exit 1
8989
fi
90-
npm version "$VERSION" --no-git-tag-version
90+
CURRENT=$(node -p "require('./package.json').version")
91+
if [ "$CURRENT" != "$VERSION" ]; then
92+
npm version "$VERSION" --no-git-tag-version
93+
else
94+
echo "Version already $VERSION, skipping patch"
95+
fi
9196
9297
- name: Package VSIX
9398
working-directory: vscode-extension

0 commit comments

Comments
 (0)