-
Notifications
You must be signed in to change notification settings - Fork 26
79 lines (66 loc) · 2.03 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-node@v4
id: setup-node
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: |
npm ci --ignore-scripts
# Please check with Brave's security team prior to adding any packages to this list.
- run: npm rebuild style-dictionary-create-react-app
- name: Format
id: format
run: |
npm run format-diff
- name: Build nala
id: build-nala
run: |
npm run build
- name: Audit Tokens
id: audit-tokens
run: |
node ./src/scripts/audit-tokens.js
- name: Diff Tokens
id: diff-tokens
run: |
curl -fsSL -o ./tokens/css/variables.old.css https://nala.bravesoftware.com/css/variables.css
# Note: Diff has exit code 1 for differences, and there are always
# some differences because the file contains a timestamp.
diff -u ./tokens/css/variables.old.css ./tokens/css/variables.css > ./tokens/css/variables.diff || :
- name: Check Types
id: check-types
run: |
npm run check
- name: Build the React example project
id: example-react
working-directory: ./examples/example-ui-react
run: |
npm install --no-save
npm run build
- name: Build Storybook
env:
NODE_OPTIONS: '--max_old_space_size=6144'
run: npm run build-storybook
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: |
./storybook-static
./tokens/css/variables.diff