-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.24 KB
/
build_extension.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
name: Extension Builder Action
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Extension
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
- name: Setup Node.js Version
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Check and setup caches
uses: actions/cache@v3
id: npm-cache
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != true
run: npm install
- name: Run build script
run: npm run avr-utils
- name: Rename application entry file
run: sed -i "s#./extension.js#out/main.js#" package.json
- name: Package Extension
run: node_modules/@vscode/vsce/vsce pack
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: extension-latest
path: "*.vsix"