Skip to content

Commit

Permalink
ci: bundle size preview (#8577)
Browse files Browse the repository at this point in the history
* ci: bundle size preview

* chore: syntax

* fix: markdown syntax for images

* fix: use github event number over sha

* fix: fix main link

* chore: format message

* fix: make preview bundle size part of the preview step

* fix: proper links

* fix: back to github.sha

* fix: determine correct commit SHA

* ok
  • Loading branch information
TkDodo authored Jan 25, 2025
1 parent 12d4542 commit 0613400
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:

permissions:
contents: read
pull-requests: write

jobs:
test:
Expand Down Expand Up @@ -57,3 +58,16 @@ jobs:
run: pnpm run build:all
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
- name: Determine commit SHA
id: determine-sha
run: |
echo "COMMIT_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
- name: Preview Bundle Size
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
with:
message: |
Sizes for commit ${{ env.COMMIT_SHA }}:
| Branch | Bundle Size |
|--------|--------|
| Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.0.0/jsx-runtime?target=es2022%22,%22react@^19.0.0?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.0.0/jsx-runtime?target=es2022%22,%22react@%5E19.0.0?target=es2022%22%5D%7D%7D) |
| This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.0.0/jsx-runtime?target=es2022%22,%22react@^19.0.0?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.0.0/jsx-runtime?target=es2022%22,%22react@%5E19.0.0?target=es2022%22%5D%7D%7D) |

0 comments on commit 0613400

Please sign in to comment.