-
Notifications
You must be signed in to change notification settings - Fork 454
46 lines (37 loc) · 1.17 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
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: '16'
check-latest: true
- name: Get Short SHA
id: get-short-sha
run: echo "::set-output name=sha::$(git rev-parse --short ${GITHUB_SHA})"
- 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 package
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: cmake-tools.vsix
path: ./cmake-tools.vsix
if-no-files-found: error