-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.1 KB
/
build.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
name: "Build"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Cache node modules
id: npm-cache
uses: actions/cache@v1
env:
cache-name: build
with:
path: node_modules
key: ${{ runner.os }}-npm-cache-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-${{ env.cache-name }}-
${{ runner.os }}-npm-cache-
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install --no-audit --no-fund
- name: Build files for client
run: npm run build
- name: Build files for server
run: npm run lib
- uses: andresz1/[email protected]
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-16.04'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_step: build