Skip to content

.github/workflows/build-and-release.yml #5

.github/workflows/build-and-release.yml

.github/workflows/build-and-release.yml #5

on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types:
- created
jobs:
build:
strategy:
matrix:
os: [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: 18.x
- run: yarn
- run: xvfb-run -a yarn test
if: runner.os == 'Linux'
- run: yarn test
if: runner.os != 'Linux'
- name: Publish
if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
run: yarn deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}