-
Notifications
You must be signed in to change notification settings - Fork 333
27 lines (22 loc) · 732 Bytes
/
size.yml
File metadata and controls
27 lines (22 loc) · 732 Bytes
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
name: Bundle Size
on: [pull_request]
jobs:
size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
# Posts a PR comment showing the gzip size diff vs the base branch.
# Does not require size-limit to be installed on the base branch —
# measures the built artifact sizes directly.
- uses: preactjs/compressed-size-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: 'dist/{index.es.js,index.js}'
build-script: 'build'