Skip to content

track bundle size with github token bot #1

track bundle size with github token bot

track bundle size with github token bot #1

Workflow file for this run

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 }}