name: Compressed Size

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: preactjs/compressed-size-action@v1
        with:
          repo-token: '${{ secrets.GITHUB_TOKEN }}'
          pattern: 'dist/umd/*.min.js'
          build-script: 'build:bundles'
          show-total: false
          compression: brotli
