Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

feat: update workflows to use Node.js tags and improve release proces… #34

feat: update workflows to use Node.js tags and improve release proces…

feat: update workflows to use Node.js tags and improve release proces… #34

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
uses: coactions/setup-xvfb@v1
with:
run: npm test
- name: Package extension
run: |
npx @vscode/vsce package
- name: Get version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Extract changelog for version
id: changelog
run: |
VERSION=${GITHUB_REF#refs/tags/v}
# Extract changelog section for this version
sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
if [ ! -s release_notes.md ]; then
echo "No changelog found for version $VERSION"
echo "# Release $VERSION" > release_notes.md
echo "See CHANGELOG.md for details." >> release_notes.md
fi
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: '*.vsix'
bodyFile: 'release_notes.md'
draft: false
prerelease: false
name: 'Release ${{ steps.get_version.outputs.TAG }}'
tag: ${{ steps.get_version.outputs.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
# Publishing to marketplaces requires secrets to be configured
# VSCE_PAT and OVSX_PAT need to be added as repository secrets
# Uncomment and configure these steps when ready to publish
# - name: Publish to VS Code Marketplace
# run: npx @vscode/vsce publish --pat ${{ secrets.VSCE_PAT }}
# if: secrets.VSCE_PAT != null
# - name: Publish to Open VSX Registry
# run: npx ovsx publish *.vsix --pat ${{ secrets.OVSX_PAT }}
# if: secrets.OVSX_PAT != null