Set version in release #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
if: false | |
run: | | |
$env:GITHUB_REF_NAME | |
$env:GITHUB_REF_NAME -match "v(?<version>.*)" | |
$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 }} |