Skip to content

docs: Changelog entry for 0.17.0 (#269) #12

docs: Changelog entry for 0.17.0 (#269)

docs: Changelog entry for 0.17.0 (#269) #12

Workflow file for this run

name: Publish Release
on:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check that package.json is up-to-date
run: |
# this version has no v prefix, e.g. 1.0.0
VERSION_FROM_PACKAGE_JSON=$(jq -r '.version' package.json)
# the GITHUB_REF_NAME is the tag name, e.g. v1.0.0
VERSION_FROM_GITHUB_REF_NAME=${GITHUB_REF_NAME:1} # remove the v prefix
if [ "$VERSION_FROM_PACKAGE_JSON" = "$VERSION_FROM_GITHUB_REF_NAME" ]; then
echo "The versions match, proceeding to publish."
else
echo "Please update the version in package.json to match the tag."
exit 1
fi
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "14"
- name: Install dependencies
run: npm install
- name: Install vsce
run: npm install -g vsce
- name: Publish to marketplace
run: |
vsce publish \
--no-update-package-json \
--no-git-tag-version \
-p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} \
${GITHUB_REF_NAME:1}