Chore: add diff action on main branch #10
Workflow file for this run
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: Diff | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, closed] | |
| branches: [main] | |
| jobs: | |
| Build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Pnpm | |
| run: | | |
| npm install -g corepack@latest --force | |
| corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install Dependencies and Build | |
| run: | | |
| pnpm install | |
| - name: Build Demo Project | |
| run: | | |
| cd benchmark/bundle-diff | |
| RSDOCTOR=1 pnpm run build | |
| - name: Report Compressed Size | |
| uses: web-infra-dev/rsdoctor-action@main | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| file_path: 'benchmark/bundle-diff/dist/rsdoctor-data.json' | |
| target_branch: 'main' |