Publish VSCode Extension #15
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
on: | |
push: | |
branches: | |
- main | |
# tags: | |
# - v* | |
# release: | |
# types: | |
# - created | |
workflow_dispatch: | |
inputs: | |
publish_vse: | |
type: boolean | |
default: false | |
description: publish to marketplace | |
publish_github: | |
type: boolean | |
default: false | |
description: publish to GitHub release | |
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: 18.x | |
- run: npm install | |
- run: xvfb-run -a npm test | |
if: runner.os == 'Linux' | |
- run: npm test | |
if: runner.os != 'Linux' | |
- name: Publish to marketplace | |
if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && ${{ inputs.publish_vse }} | |
run: npm run deploy | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} |