Skip to content

Commit 6a64967

Browse files
committed
ci: switch bundle size action to preactjs/compressed-size-action
andresz1/size-limit-action checks out the base branch and runs size-limit there, but size-limit isn't in master's package.json yet, causing npx to fail with no JSON output. preactjs/compressed-size-action measures built artifact sizes directly without requiring size-limit on the base branch — same approach used by react-hook-form.
1 parent c2de875 commit 6a64967

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/size.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ jobs:
1717
- name: Install dependencies
1818
run: yarn install --frozen-lockfile
1919

20-
# Posts a PR comment showing the brotli size diff vs the base branch.
21-
# Fails CI if either artifact exceeds the limit defined in package.json "size-limit".
22-
- uses: andresz1/size-limit-action@v1
20+
# Posts a PR comment showing the gzip size diff vs the base branch.
21+
# Does not require size-limit to be installed on the base branch —
22+
# measures the built artifact sizes directly.
23+
- uses: preactjs/compressed-size-action@v2
2324
with:
24-
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
26+
pattern: 'dist/{index.es.js,index.js}'
27+
build-script: 'build'

0 commit comments

Comments
 (0)