We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 652e832 commit b477746Copy full SHA for b477746
.github/workflows/building-bundle.yml
@@ -66,6 +66,7 @@ jobs:
66
- name: Publish Hexa VSCode bundle
67
if: github.event_name == 'release' && github.event.action == 'created'
68
run: |
69
+ node tagToVersion.js ${{ github.ref_name }}
70
npx vsce publish
71
env:
72
VSCE_PAT: ${{ secrets.VSCE_PAT }}
tagToVersion.js
@@ -0,0 +1,12 @@
1
+const fs = require('fs')
2
+const ref = process.argv.pop().trim()
3
+const tag = ref.split('v').pop()
4
+console.log({ref, tag })
5
+
6
+function update(file, pattern) {
7
+ const json = fs.readFileSync(file).toString()
8
+ fs.writeFileSync(file, json.split(pattern).join(tag))
9
+}
10
11
+update('package.json', "0.2.1")
12
+update('package-lock.json', "0.1.2")
0 commit comments