diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 97f38cd..3c4364a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,4 +2,3 @@ - [ ] Used only camelCase variable names. - [ ] If functionality is added or modified, also made respective changes to the `README.md` (the `.txt` file is auto-generated and does not need to be modified). -- [ ] If a non-trivial PR, formatting via `stylua`. diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml new file mode 100644 index 0000000..2fe11eb --- /dev/null +++ b/.github/workflows/stylua.yml @@ -0,0 +1,20 @@ +name: Format with Stylua + +on: + push: + branches: [ main ] + paths: [ '**.lua' ] + +jobs: + postprocessing: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: JohnnyMorganz/stylua-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: --check . + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "style: format with stylua"