forked from overextended/fivem-lls-addon
-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (43 loc) · 1.3 KB
/
codegen.yml
File metadata and controls
51 lines (43 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update native definitions
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * SUN
jobs:
update-natives:
if: github.actor_id != 210085057
runs-on: ubuntu-latest
steps:
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Generate GitHub App token
id: app_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get latest code
uses: actions/checkout@v4
with:
token: ${{ steps.app_token.outputs.token }}
- name: Generate natives
run: |
wget https://github.com/communityox/rage-lua-natives/archive/main.zip -O repo.zip
unzip repo.zip
cd rage-lua-natives-main
bun install --frozen-lockfile
bun run start
cd ..
rm -rf library/natives/*
mv -f rage-lua-natives-main/build/cfx/{CFX-NATIVE,GTAV,RDR3} library/natives/
rm -rf rage-lua-natives-main
rm repo.zip
- name: Update repository
uses: EndBug/add-and-commit@v9
with:
add: '.'
push: true
default_author: github_actions
message: 'ci: generate native definitions'