-
Notifications
You must be signed in to change notification settings - Fork 909
39 lines (32 loc) · 994 Bytes
/
bundlesize.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
name: Analyze Library Bundle Size
on:
workflow_run:
workflows:
- Pull requests
types:
- completed
jobs:
compare-bundle-size:
name: Compare Bundle Size
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
env:
# Configuration for Bundlewatch
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
steps:
- name: Install package manager
uses: pnpm/action-setup@v2
with:
version: 7.26.3
run_install: false
- name: Download built bundles
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{github.event.workflow_run.id}}
name: library-dist
- name: Run Bundlewatch
run: pnpx bundlewatch