chore: release v2.0.0 #299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lua lint and format | |
on: | |
push: | |
branches: [ "master" ] | |
paths: | |
- "lua/**" | |
pull_request: | |
branches: [ "master" ] | |
paths: | |
- "lua/**" | |
jobs: | |
lint-and-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Lint Lua | |
uses: lunarmodules/luacheck@v1 | |
- name: Format Lua | |
if: github.event_name == 'push' | |
uses: JohnnyMorganz/stylua-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: latest | |
args: lua --color always | |
- name: Apply changes | |
if: github.event_name == 'push' | |
run: | | |
git pull | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "style(lua): reformat code" || echo "No changes to commit" | |
git push |