chore: New release v4.1.0 #8
Workflow file for this run
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: 'Tag name for release' | |
required: false | |
default: test | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
build_vsix: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: npm ci | |
- name: Setup Environment | |
run: node -e "console.log('PKG_VERSION=' + require('./package.json').version + '\nPKG_NAME=' + require('./package.json').name + '-' + require('./package.json').version)" >> $GITHUB_ENV | |
- name: Verify versions | |
run: node -e "if ('refs/tags/v' + '${{ env.PKG_VERSION }}' !== '${{ github.ref }}') { console.log('::error' + 'Version Mismatch. refs/tags/v' + '${{ env.PKG_VERSION }}', '${{ github.ref }}'); throw Error('Version Mismatch')} " | |
- name: Pack vsix | |
shell: bash | |
run: | | |
npm install -g @vscode/vsce | |
vsce package -o ${{ env.PKG_NAME }}.vsix | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: ${{ env.PKG_NAME }}.vsix |