You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Package Size Badge Action
v1.0.1
This GitHub Action calculates the JavaScript bundle size of your project and generates a dynamic badge using Shields.io.
To use this action, add it to your workflow like this:
name: "Package Size Report"
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Analyze and Create Badge
uses: your-username/package-size-badge-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
path: "build/static/js/*.js" # User specifies the path to their JS bundles
preset: "app" # Can be "app", "big-lib", or "small-lib"
limit: "300" # Optional size limit (in KB)
color: "green" # Optional badge color