From f1aa52a6a3d7f8de30dd1f02fe193f2b07684096 Mon Sep 17 00:00:00 2001 From: lihao Date: Wed, 27 Jul 2022 11:59:11 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=20size-limit=20?= =?UTF-8?q?=E7=9A=84=20workflows=20(#36721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/size-limit.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/size-limit.yml diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml new file mode 100644 index 0000000000..ed8009427c --- /dev/null +++ b/.github/workflows/size-limit.yml @@ -0,0 +1,31 @@ +name: 📦 Compressed Size(size-limit) + +on: + pull_request: + types: [opened, synchronize] + +# Cancel prev CI if new commit come +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + compressed-size: + permissions: + contents: read # for actions/checkout to fetch code + pull-requests: write # for preactjs/compressed-size-action to create PR comments + runs-on: ubuntu-latest + env: + CI_JOB_NUMBER: 1 + + steps: + - uses: actions/checkout@v3 + - uses: andresz1/size-limit-action@v1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + pattern: "./dist/**/*.min.{js,css}" + build-script: "dist:esbuild-no-dup-check" + clean-script: "clean-lockfiles"