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

Enabling tracking of non-js files #29

Closed Allcharles closed 4 years ago

Allcharles commented 4 years ago

Currently it appears this compress-size-action only contains the ability to track changes in .js files. Is it possible to expand this to track all changed build file types? Or at least provide a regex or list which identifies all filetypes to track? For example, a generic angular project build file will contain a mixture of js, css, json, and html files (along with a few other minor extension types).

developit commented 4 years ago

This is already supported - you can pass any file type in the pattern option:

name: Compressed Size

on: [pull_request]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: preactjs/compressed-size-action@v2
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"
+       pattern: "build/**/*.{css,js,json,html}"