Skip to content

Commit 5670faf

Browse files
authored
Merge pull request #35 from ryanbas21/fix/vscode-version-stamp
fix(ci): use node script instead of npm version for VS Code stamp
2 parents 61e8e53 + da04e84 commit 5670faf

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)