Update native definitions #4
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: Update native definitions | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 0 * * SUN | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Generate natives | |
run: | | |
wget https://github.com/thelindat/fivem-lua-natives/archive/master.zip -O repo.zip | |
unzip repo.zip | |
cd fivem-lua-natives-master | |
npm install | |
npm start | |
cd .. | |
rm -rf library/natives/* | |
mv -f fivem-lua-natives-master/build/cfx/{CFX-NATIVE,GTAV,RDR3} library/natives/ | |
rm -rf fivem-lua-natives-master | |
rm repo.zip | |
- name: Update repository | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git diff-index --quiet HEAD || git commit -am "ci: generate native definitions" | |
git push |