-
Notifications
You must be signed in to change notification settings - Fork 869
39 lines (33 loc) · 1022 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'
steps:
- name: Install package manager
uses: pnpm/action-setup@v3
with:
version: 9.1.0
run_install: false
- name: Download Library Bundle
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: library-dist
- name: Run Bundlewatch
run: pnpm dlx bundlewatch
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_BRANCH: ${{ github.ref }}
CI_BRANCH_BASE: refs/heads/master
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}