-
Notifications
You must be signed in to change notification settings - Fork 78
63 lines (52 loc) · 1.59 KB
/
test-app.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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test-app
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-pal:
name: Build PAL
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
react:
- 'packages/react/**'
- name: Increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Use Node.js
uses: actions/setup-node@v4
if: steps.changes.outputs.react == 'true'
with:
node-version: '20.x'
- name: Cache dependencies
uses: actions/cache@v4
if: steps.changes.outputs.react == 'true'
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.changes.outputs.react == 'true'
run: |
yarn --frozen-lockfile
yarn lerna run --stream postinstall
yarn lerna link
- name: Run build
if: steps.changes.outputs.react == 'true'
run: |
cd packages/react
yarn build
mkdir -p dist
cp -rf package.json umd scss lib es css ./dist
- name: Archive build artifacts
if: ${{ success() }} && steps.changes.outputs.react == 'true'
uses: actions/upload-artifact@v4
with:
name: dist
path: packages/react/dist