-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (48 loc) · 1.38 KB
/
release.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
48
49
50
51
name: Build .vsix release asset
on: push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node v18
uses: actions/setup-node@v4
with:
# the current node version use in vscode
node-version: '18'
cache: 'yarn'
- name: Install Dependencies
run: |
npm i -g @vscode/vsce
yarn
- name: Package Extension
run: |
yarn lint
vsce package
- name: Test PAT
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
env:
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }}
run: |
vsce verify-pat raspberry-pi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: raspberry-pi-pico
path: raspberry-pi-pico-*.vsix
- name: Add Release Asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: raspberry-pi-pico-*.vsix
- name: Publish Extension
if: startsWith(github.ref, 'refs/tags/')
env:
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_PAT }}
run: |
vsce publish -i raspberry-pi-pico-*.vsix