Skip to content

Add conditional check for tag-based publishing in CI configuration #13

Add conditional check for tag-based publishing in CI configuration

Add conditional check for tag-based publishing in CI configuration #13

Workflow file for this run

on:
push:
branches:
- master
release:
types:
- created
jobs:
build:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 23.x
- run: npm -g install pnpm@latest
- run: pnpm install
- run: xvfb-run -a pnpm test
if: runner.os == 'Linux'
- run: pnpm test
if: runner.os != 'Linux'
publish:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 23.x
- run: npm -g install pnpm@latest
- run: pnpm install
- name: Publish
run: pnpm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}