Skip to content

Commit c08c0b7

Browse files
committed
fixup!: use $VERSION in npm-version
1 parent e503fa4 commit c08c0b7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,23 @@ jobs:
305305
- name: Decompress npm package
306306
run: tar -xzf package.tar.gz
307307

308+
# NOTE@jsjoeio - we do this so we can strip out the v
309+
# i.e. v4.9.1 -> 4.9.1
310+
- name: Get and set VERSION
311+
run: |
312+
TAG="${{ inputs.version || github.ref_name }}"
313+
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
314+
308315
- name: Modify version
316+
env:
317+
VERSION: ${{ env.VERSION )}}
309318
run: |
310319
echo "Updating version in root package.json"
311-
npm version --prefix release ${{ inputs.version || github.ref_name }}
320+
npm version --prefix release "$VERSION"
312321
313322
echo "Updating version in lib/vscode/product.json"
314323
tmp=$(mktemp)
315-
jq '.codeServerVersion = "${{ inputs.version || github.ref_name }}"' release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
324+
jq '.codeServerVersion = "$VERSION"' release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
316325
317326
- name: Compress release package
318327
run: tar -czf package.tar.gz release

0 commit comments

Comments
 (0)