Skip to content

Commit 5e9057a

Browse files
committed
Set VS Code extension version from release tag in CI
1 parent 11e35fb commit 5e9057a

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/on-push-tag.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,17 @@ jobs:
3636
dotnet build FScript.sln -c Release --no-restore
3737
dotnet test FScript.sln -c Release --no-build
3838
39-
- name: Validate tag matches extension version
40-
shell: bash
41-
run: |
42-
TAG_VERSION="${GITHUB_REF_NAME}"
43-
EXT_VERSION=$(node -p "require('./vscode-fscript/package.json').version")
44-
if [ "$TAG_VERSION" != "$EXT_VERSION" ]; then
45-
echo "Tag version ($TAG_VERSION) does not match vscode-fscript/package.json version ($EXT_VERSION)."
46-
exit 1
47-
fi
48-
4939
- name: Install extension dependencies
5040
working-directory: vscode-fscript
5141
run: npm ci
5242

43+
- name: Sync extension version to tag
44+
shell: bash
45+
working-directory: vscode-fscript
46+
run: |
47+
TAG_VERSION="${GITHUB_REF_NAME}"
48+
npm version "$TAG_VERSION" --no-git-tag-version --allow-same-version
49+
5350
- name: Build and stage language server
5451
shell: bash
5552
run: |

0 commit comments

Comments
 (0)