Skip to content

Commit

Permalink
track bundle size with github token bot
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Aug 30, 2024
1 parent 5dcf243 commit 0850f25
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bundle Size

on:
pull_request:
branches:
- main

jobs:
bundle-size:
name: Report bundle size
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build
run: bun run build

- name: Get bundle size
id: size
run: |
echo "dist=$(du -sh dist | cut -f1)" >> $GITHUB_OUTPUT
- name: Update comment
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
header: Bundle Size
message: |
Bundle `dist` size: ${{ steps.size.outputs.dist }}

0 comments on commit 0850f25

Please sign in to comment.