-
Notifications
You must be signed in to change notification settings - Fork 20
52 lines (45 loc) · 1.3 KB
/
build.yaml
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
51
52
name: build
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn lint
- run: yarn build
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "The dist/ directory is out of date. Please run 'yarn build' and commit the changes."
echo "See status below:"
git diff
exit 1
fi
build-api:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn generate
- name: Compare the expected and generated types
run: |
if [ "$(git diff --ignore-space-at-eol index.d.ts | wc -l)" -gt "0" ]; then
echo "The types definitions are out of date. Please run 'yarn generate' and commit the changes."
echo "See status below:"
git diff
exit 1
fi