Description
compressed-size-action is a GitHub Action that reports how the compressed size of your build output changes in each pull request. It builds the pull request branch, builds the target branch and compares the two, so the report shows the difference in compressed file sizes. It detects the package manager from your lockfiles and uses yarn, pnpm, bun, deno or npm ci as needed. The action does not upload anything or rely on centralized storage. You can set a custom build script and file patterns, pass a custom install command, and add postinstall or prebuild scripts, for example in a Lerna monorepo. GitHub's permission model stops the action from creating comments for pull requests that come from forks, so in that case it prints the comment it would have posted to the log. The markdown comment is also exposed as an output, so a later step or a separate workflow can post it with the permissions it needs. The project is hosted on GitHub under the preactjs organization. It is aimed at JavaScript developers who want to catch bundle size changes during review.…
Highlights
- Compares compressed file sizes between a PR and its target
- Detects yarn, pnpm, bun, deno or npm from lockfiles
- No upload or central storage of build output
- Custom install and build steps and file patterns
- Comment output for fork pull requests and separate workflows
Ratings & Reviews
No ratings yet
Be the first to rate Compressed Size Action.
People also visit
Verify Changed Files
Github action to verify file changes that occur during the workflow execution
Compressed Size Action FAQ
What does it do?
It adds a comment to pull requests that shows how compressed file sizes change compared with the target branch.
How does it know which package manager to use?
It looks for lockfiles and uses yarn, pnpm, bun, deno or npm ci when they are present.
Does it store my build output?
No. The site says it does not upload anything or rely on centralized storage.
Why is there no comment on pull requests from forks?
GitHub's permission model stops the action from creating comments for forks, so it prints the comment to the action log instead.
Can I customize the build?
Yes. You can pass a custom install command, add postinstall and prebuild scripts, and set file patterns.
What are the best Compressed Size Action alternatives?
Popular alternatives to Compressed Size Action include CommitFlow, Releaser Tools and Secure Repo. See all Compressed Size Action alternatives









