-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.27 KB
/
build-vsix.yml
File metadata and controls
54 lines (44 loc) · 1.27 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
52
53
54
name: Build VSIX
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-vsix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Compile extension
run: npm run compile
- name: Set VSIX output name
run: |
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
echo "VSIX_PATH=open-command-${GITHUB_REF_NAME}.vsix" >> "$GITHUB_ENV"
else
echo "VSIX_PATH=open-command.vsix" >> "$GITHUB_ENV"
fi
- name: Package VSIX
run: npm run package:vsix -- --out "${VSIX_PATH}"
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: open-command-vsix
path: ${{ env.VSIX_PATH }}
if-no-files-found: error
- name: Publish VSIX to GitHub Releases
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: ${{ env.VSIX_PATH }}
fail_on_unmatched_files: true
generate_release_notes: true