ci: add release quality gates to prevent issue #419 class of misses #2
This file contains hidden or 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: 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' |