-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (48 loc) · 1.72 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
name: Build
on:
push:
branches-ignore:
- release/* # already building package when publishing
jobs:
build:
name: Build packages and examples (test)
runs-on: ubuntu-latest
steps:
- name: Checkout Git repository
uses: actions/checkout@v3
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup Node (uses version from .nvmrc)
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- name: Get Yarn cache directory path
run: echo ::set-output name=DIR::$(yarn cache dir)
id: yarn-cache
- name: Cache Yarn
uses: actions/[email protected]
with:
path: ${{ steps.yarn-cache.outputs.DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node dependencies
run: yarn --frozen-lockfile --prefer-offline
- name: Build packages
run: yarn build
- name: Build (bundled) examples
run: |
yarn --cwd ./examples/custom-themes build
yarn --cwd ./examples/html-css-js-bundler build
yarn --cwd ./examples/html-scss-ts-bundler build
yarn --cwd ./examples/react-emotion-ts-bundler build
yarn --cwd ./examples/react-scss-js-webpack build
yarn --cwd ./examples/react-scss-ts-bundler build
- name: Generate prototype
run: yarn prototype
- name: Inspect bundle size
uses: jackyef/[email protected]
with:
bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
bundlewatch-config: .bundlewatchrc.json