-
Notifications
You must be signed in to change notification settings - Fork 113
100 lines (86 loc) · 2.57 KB
/
lists.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# A simple script to auto-generate .txt game lists for Cheats Manager
# made by Bucanero
name: Push commit
on:
push:
jobs:
gamelist:
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v3
- name: Normalize json data
run: python .ci/normalize-json.py
- name: checkout
uses: actions/checkout@v3
with:
repository: michaelrsweet/mxml
path: mxml
- name: configure
working-directory: mxml
env:
CC: /usr/bin/gcc
run: ./configure --enable-debug --enable-maintainer
- name: make
working-directory: mxml
run: |
sudo make
sudo make install
- name: Test XML data
run: |
export LD_LIBRARY_PATH=$(pwd)/mxml
FILES="shn/*.shn"
clang .ci/xml.c -lmxml
for f in $FILES
do
./a.out $f
done
FILES="mc4/*.xml"
clang .ci/xml.c -lmxml
for f in $FILES
do
./a.out $f
done
- name: Create list files
run: |
clang .ci/list_files.c
./a.out json '"name"' > json.txt
./a.out shn Game > shn.txt
mkdir xml
mv mc4/*.xml xml/
./a.out xml Game > mc4.txt
mv xml/* mc4/
rmdir xml
- name: Setup git info
if: |
github.event_name == 'push' &&
github.repository == 'GoldHEN/GoldHEN_Cheat_Repository'
run: |
git config --global user.name 'kmeps4'
git config --global user.email 'kmeps4@users.noreply.github.com'
- name: Commit normalized json data
if: |
github.event_name == 'push' &&
github.repository == 'GoldHEN/GoldHEN_Cheat_Repository'
run: |
git add json/*.json
git commit -m "Normalize json data" || true
- name: Commit list files
if: |
github.event_name == 'push' &&
github.repository == 'GoldHEN/GoldHEN_Cheat_Repository'
run: |
mkdir -p misc
current=$(date '+%Y-%m-%d %H:%M:%S %A (%Z %z)')
msg="Cheat database version: $current"
git add json.txt
git add shn.txt
git add mc4.txt
echo $msg > misc/cheat_ver.txt
git add misc/cheat_ver.txt
git commit -m "Cheat lists update" || true
- name: Push to repository
if: |
github.event_name == 'push' &&
github.repository == 'GoldHEN/GoldHEN_Cheat_Repository'
run: git push || true