-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (47 loc) · 1.13 KB
/
ci.yml
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
on:
push:
branches:
- main
tags:
- v*
pull_request:
merge_group:
name: CI
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: v20.x
- name: Install dependencies
run: npm install
- name: Package extension
run: npm run package
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: package
path: '*.vsix'
publish:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: v20.x
- name: Install VSCE
run: npm install -g @vscode/vsce
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: package
- name: Publish package
run: vsce publish -i *.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}