diff --git a/.github/workflows/prevent-dist-commit.yaml b/.github/workflows/prevent-dist-commit.yaml new file mode 100644 index 00000000..181534c1 --- /dev/null +++ b/.github/workflows/prevent-dist-commit.yaml @@ -0,0 +1,23 @@ +name: prevent-dist-commit + +on: + pull_request: + branches: [main] + paths: + - '*/dist/**' + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: ':x: DO NOT add `dist` files to a pull request' + }) + - run: exit 99