Skip to content

chore: add GitHub Actions workflow for publishing extension #10

chore: add GitHub Actions workflow for publishing extension

chore: add GitHub Actions workflow for publishing extension #10

Workflow file for this run

name: Publish Extension
on:
push:
branches: ['main']
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Start Xvfb
run: |
sudo apt-get update
sudo apt-get install -y xvfb
export DISPLAY=:99.0
Xvfb :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &
- name: Run Tests
run: xvfb-run -a npm test
- name: Compile Extension
run: npm run compile
- name: Install VSCE
run: npm install -g @vscode/vsce
- name: Publish to VSCode Marketplace
run: vsce publish -p ${{ secrets.VSC_TOKEN }}