Publish extension #7
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: Publish extension | |
on: workflow_dispatch | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- uses: oven-sh/setup-bun@v1 | |
- run: npm install | |
- run: xvfb-run -a npm run test | |
if: runner.os == 'Linux' | |
- run: npm run test | |
if: runner.os != 'Linux' | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install | |
run: bun install | |
- name: Build | |
run: bun run package | |
- name: Publish | |
if: success() | |
run: bun run deploy | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} |