Compare bundle size #6348
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |