-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (48 loc) · 1.16 KB
/
main.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: CI
on:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'
- run: npm ci
- name: Cache .vscode-test
uses: actions/cache@v3
with:
path: .vscode-test
key: ${{ runner.os }}-test
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: Set nightly version
run: |
timestamp=$(date +%Y%m%d%H%M%S)
version=$(npm pkg get version | sed 's/\"//g')
npm pkg set version="$version-next+$timestamp"
if: runner.os == 'Linux'
- name: Create VSIX package
run: npm run package -- --pre-release
if: runner.os == 'Linux'
- name: Upload VSIX package artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vsix
path: '*.vsix'
retention-days: 1