Skip to content

Commit da04e84

Browse files
ryanbas21claude
andcommitted
fix(ci): use node script instead of npm version for VS Code extension stamp
npm version rejects 4-segment versions (e.g. 0.1.0.44) since it requires semver. Replace with a node -e script that writes the version directly to package.json. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 61e8e53 commit da04e84

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ jobs:
8080
env:
8181
BUILD_NUMBER: ${{ github.run_number }}
8282
run: |
83-
BASE=$(node -p "require('./package.json').version")
84-
npm version "${BASE}.${BUILD_NUMBER}" --no-git-tag-version
83+
node -e "
84+
const fs = require('fs');
85+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
86+
pkg.version = pkg.version + '.' + process.env.BUILD_NUMBER;
87+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
88+
"
8589
8690
- name: Publish VS Code extension (pre-release)
8791
if: inputs.extension

0 commit comments

Comments
 (0)