-
Notifications
You must be signed in to change notification settings - Fork 50
44 lines (37 loc) · 1.03 KB
/
deploy-vscode.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
name: VSCode Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo at the pushed tag
uses: actions/checkout@v4
with:
# This configures the action to checkout the commit that was tagged,
# which is effectively the code state you want to work with.
ref: ${{ github.ref }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Cache NPM
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/vscode/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: |
cd vscode
npm ci
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/')
run: |
cd vscode
npx vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}