Skip to content

refactor(skill-applier): streamline skill linking logic and enhance p… #53

refactor(skill-applier): streamline skill linking logic and enhance p…

refactor(skill-applier): streamline skill linking logic and enhance p… #53

Workflow file for this run

name: Release VSIX on Tag
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Verify tag matches package.json version
run: |
RAW_TAG="${GITHUB_REF_NAME#v}"
# Strip branch suffix e.g. 2.4.0(main) -> 2.4.0
TAG="${RAW_TAG%%(*}"
PKG_VERSION="$(node -p "require('./package.json').version")"
if [ "$TAG" != "$PKG_VERSION" ]; then
echo "Tag version ($TAG) does not match package.json version ($PKG_VERSION). (raw tag: $RAW_TAG)"
exit 1
fi
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Compile extension
run: npm run compile
- name: Package VSIX
run: npx @vscode/vsce package
- name: Create Release and Upload VSIX
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: '*.vsix'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}