Skip to content

Generate the extension vsix for each build #60

Generate the extension vsix for each build

Generate the extension vsix for each build #60

Workflow file for this run

# This is a basic workflow
name: CI
# Triggers the workflow on all pushes or pull requests on the main branch
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest] #FIXME windows-latest fails to run tests
steps:
# Checkout code
- uses: actions/checkout@v4
# Set up Node
- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20
# Run install dependencies
- name: Install dependencies
run: npm run install:ci
# Build extension
- name: Run build
run: npm run package
# Generate .vsix package for the extension
- name: Generate .vsix package
run: |
npm install -g @vscode/vsce
vsce package
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-granite-vsix-${{ runner.os }}-${{ github.run_id }} # Unique name with OS and run ID
path: "./vscode-granite-*.vsix"
# Run tests
- name: Run Test
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
with:
run: npm test