-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (50 loc) · 1.45 KB
/
ci.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
- pull_request
jobs:
ci:
name: Node.js ${{ matrix.node-version }} on ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on:
- ubuntu-18.04
- ubuntu-20.04
- macos-latest
- windows-latest
node-version:
- 12
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ matrix.runs-on }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: |
yarnpkg install --frozen-lockfile
- name: Build
run: |
./node_modules/.bin/grafana-toolkit plugin:ci-build
- name: Keep build results
run: |
./node_modules/.bin/grafana-toolkit plugin:ci-build --finish
- name: Package
if: |
startsWith(matrix.runs-on, 'ubuntu-')
run: |
GRABPL_VERSION=0.5.0
wget https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${GRABPL_VERSION}/grabpl
chmod +x grabpl
sudo mv grabpl /usr/local/bin/
./node_modules/.bin/grafana-toolkit plugin:ci-package
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.runs-on }}-nodejs-${{ matrix.node-version }}
path: ci