Fix Intel OpenGL crashes (#2171) #1
This file contains hidden or 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: Generate Lua library | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'rts/Lua/**' | |
jobs: | |
generate-library: | |
if: github.repository == 'beyond-all-reason/spring' || github.event_name == 'workflow_dispatch' | |
name: Regenerate library | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure git | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- name: Checkout Lua CPP files | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: rts/Lua | |
path: recoil | |
# NOTE: This step is duplicated in `publish-site.yml` | |
- name: Generate Lua library | |
working-directory: recoil | |
run: | | |
npm install -g lua-doc-extractor@3 | |
lua-doc-extractor rts/Lua/*.cpp \ | |
--dest rts/Lua/library/generated \ | |
--repo https://github.com/${{ github.repository }}/blob/${{ github.sha }} | |
- name: Check out library repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ vars.RECOIL_LUA_LIBRARY_RESPOSITORY }} | |
ssh-key: ${{ secrets.RECOIL_LUA_LIBRARY_SSH_KEY }} | |
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. | |
# | |
# NOTE: The commit message will only be present on a push event. | |
- 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 }} | |
${{ github.event.head_commit.message }} |