37 lines
820 B
YAML
37 lines
820 B
YAML
name: Generate LuaLS Definitions
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'src/elements/**'
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- 'src/elements/**'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
generate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Lua
|
|
uses: leafo/gh-actions-lua@v8
|
|
with:
|
|
luaVersion: "5.4"
|
|
|
|
- name: Generate LuaLS definitions
|
|
run: |
|
|
lua tools/annotationParser.lua src/elements src/LuaLS.lua
|
|
|
|
- name: Commit changes
|
|
if: github.event_name == 'push'
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add src/LuaLS.lua
|
|
git commit -m "Update LuaLS definitions" || true
|
|
git push
|