-
Notifications
You must be signed in to change notification settings - Fork 3.6k
45 lines (37 loc) · 1 KB
/
size_report_create.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
name: Create Build Size Report
on:
pull_request:
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout Base
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
path: base
- name: Checkout PR
uses: actions/checkout@v4
with:
path: pr
- name: Build CDN (Base)
run: |
npm ci
npm run build-cdn
working-directory: ./base
- name: Build CDN (PR)
run: |
npm ci
npm run build-cdn
working-directory: ./pr
- name: Create Size Report
run: |
mkdir size_report
echo ${{ github.event.number }} > size_report/pull_req_nr
REPORT=$(./pr/tools/buildSizeReport.js ./base/build ./pr/build)
echo "$REPORT" > size_report/report.md
- name: Save Size Report as Artifact
uses: actions/upload-artifact@v4
with:
name: size_report
path: ./size_report