Skip to content

Deploy Extension

Deploy Extension #3

Workflow file for this run

on:
push:
tags:
- "v*"
name: Deploy Extension
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Validate version
run: |
yarn install
sudo apt install -y jq
X=$(jq < package.json -re .version)
Y=$(yarn --silent semver "${GITHUB_REF#refs/tags/}" | sed 's/^v//')
if [ "$X" != "$Y" ]; then
echo "Tag and package.json version do not match"
echo " pkg: $X"
echo " tag: $Y"
exit 1
fi
- name: Publish to Open VSX Registry
uses: HaaLeo/[email protected]
id: publishToOpenVSX
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/[email protected]
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}