Skip to content

Build and Release VSIX #14

Build and Release VSIX

Build and Release VSIX #14

Workflow file for this run

name: Build and Release VSIX
on:
workflow_dispatch: # Trigger the workflow manually
inputs:
# Version MUST be in the format v*.*.*
# Version MUST NOT already exist, else the workflow will fail
version:
description: 'Version number (v*.*.*)'
required: true
type: string
permissions:
# Allows the workflow to create releases, upload release assets, and manage repository contents
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# Documentation: https://github.com/actions/checkout
- name: Checkout repository
uses: actions/checkout@v4
# Documentation: https://github.com/actions/setup-node
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Package Extension
run: npm run package
# Documentation: https://github.com/softprops/action-gh-release
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: "*.vsix"
tag_name: ${{ github.event.inputs.version }}
# Publish to VS Code Marketplace
- name: Publish to VS Code Marketplace
run: npx vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}