Skip to content

Set version in release #4

Set version in release

Set version in release #4

on:
release:
types:
- published
pull_request:
branches:
- "*"
# NOTE: this is a separate workflow because
# the version-setting relies on environment variables,
# and that works differently in powershell.
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'yarn'
- run: yarn install --ignore-engines
- name: Write release version
run: |
$env:GITHUB_REF_NAME
$env:GITHUB_REF_NAME -match "v(?<version>.*)"
set-strictmode -off
$VERSION=$Matches['version']
"Version: $VERSION"
$env:GITHUB_ENV += "\nVERSION=$VERSION"
- run: "npm version 1.0.0 --no-git-tag-version"
- name: Publish
run: yarn deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}