-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lua library action updates submodule
- Loading branch information
Showing
2 changed files
with
62 additions
and
35 deletions.
There are no files selected for viewing
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
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 }} |
This file was deleted.
Oops, something went wrong.