diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml new file mode 100644 index 0000000..a828097 --- /dev/null +++ b/.github/workflows/size-limit.yml @@ -0,0 +1,20 @@ +name: "size-limit" + +on: + pull_request: + branches: + - main + +permissions: + pull-requests: write + +jobs: + size: + runs-on: ubuntu-latest + env: + CI_JOB_NUMBER: 1 + steps: + - uses: actions/checkout@v4 + - uses: andresz1/size-limit-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index ecd818d..147c519 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ "scripts": { "start": "tsup && concurrently -k -r \"tsup --watch\" \"web-dev-server\"", "build": "tsup", - "size": "npm run build && size-limit", "prepublish": "tsup", "lint": "eslint && prettier \"**/*.ts\" --check --ignore-path .gitignore", "format": "eslint . --fix && prettier \"**/*.ts\" --write --ignore-path .gitignore", + "size": "npm run build && size-limit", "test": "vitest run && npm run size", "test:watch": "vitest --watch", "test:coverage": "vitest --coverage"