-
Notifications
You must be signed in to change notification settings - Fork 457
47 lines (38 loc) · 1.21 KB
/
build-vsix.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
name: Build VSIX
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '20'
check-latest: true
- name: Get Short SHA
id: get-short-sha
run: echo "sha=$(git rev-parse --short ${GITHUB_SHA})" >> $GITHUB_OUTPUT
- name: Update the package version
uses: jacobtomlinson/gha-find-replace@master
with:
find: "\"version\": \"(\\d+\\.\\d+\\.\\d+)\""
replace: "\"version\": \"$1-${{ steps.get-short-sha.outputs.sha }}\""
include: "package.json"
exclude: ".git"
- name: Build the VSIX
run: |
yarn install
yarn run compile-production
yarn run package
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: cmake-tools.vsix
path: ./cmake-tools.vsix
if-no-files-found: error