-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (36 loc) · 1.03 KB
/
build-check.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
name: Run build check
on:
pull_request:
branches: [dev, master]
jobs:
build:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Create target directory and copy file
run: |
cd near
mkdir target
cp dist/index.js target/index.js
- name: Install dependencies
run: yarn
working-directory: ./near
- name: Build
run: yarn build
working-directory: ./near
working-directory: ./near
- name: Check dist/index.js
run: cmp dist/index.js target/index.js
working-directory: ./near
working-directory: ./near
- name: Failure message
if: failure()
uses: actions/github-script@v3
with:
script: |
core.setFailed('The dist/index.js seems to be stale. Please run *yarn build* and commit the dist/index.js file.')
working-directory: ./near