preactjs / compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
https://github.com/marketplace/actions/compressed-size-action
MIT License
602 stars 84 forks source link

Size change always 0 Bytes #92

Closed selankon closed 7 months ago

selankon commented 1 year ago

Looking at this action (and any other on my project) the size change is always 0 B:

**Size Change:** 0 B 🆕

**Total Size:** 0 B

https://github.com/libremesh/lime-app/actions/runs/4828080867/jobs/8601485901?pr=370#step:4:332

The size on the current build for index.html is 869 B:

https://github.com/libremesh/lime-app/actions/runs/4828080867/jobs/8601485901?pr=370#step:4:157

Instead for the base is 567 B:

https://github.com/libremesh/lime-app/actions/runs/4828080867/jobs/8601485901?pr=370#step:4:291

Not sure if I' doing something bad? Is using node 16.

saraC15 commented 1 year ago

Experienced the same on Node 18.17.1, which was the closest to the recommended version as I could specify.

rschristian commented 7 months ago

Sorry for the long delay.

This looks to be operating correctly. Per the docs, the default input pattern in **/dist/**/*.js. On the linked Preact-CLI app, it's building to /build, hence, the pattern won't match anything.

Customizing the input files is the correct action here:

with:
  pattern: "/build/**/*.js"