Skip to content

Commit

Permalink
Lua library action updates submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
rhys-vdw committed Dec 1, 2024
1 parent ca2df6d commit 49b9c26
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 35 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/generate-lua-library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Generate Lua library
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'rts/Lua/**'
jobs:
generate-library:
name: Regenerate library
runs-on: ubuntu-latest
steps:
- name: Configure git
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Checkout Lua CPP files
uses: actions/checkout@v4
with:
sparse-checkout: rts/Lua
path: recoil

- name: Install extractor tool
run: |
npm install rhys-vdw/lua-doc-extractor
- name: Regenerate docs
working-directory: ./recoil/rts/Lua/
run: |
rm -rf library/generated
npx lua-doc-extractor *.cpp --dest library/generated
- name: Commit and push Recoil repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./recoil
commit_message: Update LuaLS library

- name: Check out library repo
uses: actions/checkout@v4
with:
repository: rhys-vdw/recoil-lua-library
token: ${{ secrets.RECOIL_LUA_LIBRARY_GITHUB_TOKEN }}
path: library

- name: Copy changes into library repo
run: |
rm -rf library/library
cp -r recoil/rts/Lua/library library
# Always try to update library repo (even if generation did not make changes).
# Hand-written files may have changed without generated output changing,
# and library may simply be out of date for whatever reason.
- name: Commit and push library repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./library
commit_message: |
Update library
Generated from https://github.com/${{ github.repository }}/commit/${{ github.sha }}
35 changes: 0 additions & 35 deletions .github/workflows/generate-lua-metafiles.yml

This file was deleted.

0 comments on commit 49b9c26

Please sign in to comment.