This repository was archived by the owner on Jan 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.44 KB
/
build.yaml
File metadata and controls
51 lines (43 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
defaults:
run:
working-directory: ./vscode-extension
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: "vscode-extension/*.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 }}