-
-
Notifications
You must be signed in to change notification settings - Fork 39
189 lines (181 loc) · 6.56 KB
/
release.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: release
on:
workflow_dispatch:
jobs:
mac_build:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: build
run: |
brew install scons
cp build/build_macos.sh .
sudo chmod +x build_macos.sh
./build_macos.sh ci
cd release
tar -czf ../mac_release.tar.gz *
cd ..
curl -u "${{secrets.CIFTP}}" -s -T mac_release.tar.gz ftp://nvgt.gg
linux_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build
run: |
sudo chmod +x build/build_linux.sh
./build/build_linux.sh ci
cd release
tar -czf ../linux_release.tar.gz *
cd ..
curl -u "${{secrets.CIFTP}}" -s -T linux_release.tar.gz ftp://nvgt.gg
android_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25c
link-to-sdk: true
add-to-path: true
- name: set_version
run: |
python3 build/ci_set_version.py
- name: build
run: |
curl -s -O https://nvgt.gg/droidev.zip
mkdir -p droidev
cd droidev
unzip -q ../droidev.zip
cd ../jni
echo "${{secrets.ANDROID_RUNNER_KEYSTORE}}" > android_enc.keystore
cat android_enc.keystore | base64 -d > android.keystore
./gradlew assembleRunnerRelease AssembleStubRelease --no-daemon -Pandroid.injected.signing.store.file=android.keystore -Pandroid.injected.signing.store.password=${{secrets.ANDROID_RUNNER_KEYSTORE_PW}} -Pandroid.injected.signing.key.alias=app -Pandroid.injected.signing.key.password="${{secrets.ANDROID_RUNNER_KEYSTORE_PW}}"
mv build/outputs/apk/runner/release/nvgt-runner-release.apk ../nvgt_$nvgt_version.apk
cd ..
curl -u "${{secrets.CIFTP}}" -s -T nvgt_$nvgt_version.apk ftp://nvgt.gg
curl -u "${{secrets.CIFTP}}" -s -T release/stub/nvgt_android.bin ftp://nvgt.gg
windows_build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: build
run: |
pip3 install scons
choco install -y upx
curl -s -O https://nvgt.gg/windev.zip
7z x windev.zip -owindev
scons -s no_upx=0
cd release
tar -czf ../windows_release.tar.gz *
cd ..
curl -u "${{secrets.CIFTP}}" -s -T windows_release.tar.gz ftp://nvgt.gg
windows_package:
runs-on: windows-latest
needs: ["android_build", "linux_build", "mac_build", "windows_build"]
steps:
- uses: actions/checkout@v4
- name: package
run: |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz
mkdir linux_release
tar -xzf linux_release.tar.gz -C linux_release
mkdir mac_release
tar -xzf mac_release.tar.gz -C mac_release
tar -xzf windows_release.tar.gz -C release
cd doc
pip3 install -r requirements.txt
cd OSL
python3 make_osl_document.py
cd ..
python3 docgen.py
cd ..
cp -r linux_release/lib release/lib_linux
cp linux_release/stub/* release/stub
cp -r mac_release/lib release/lib_mac
cp mac_release/stub/* release/stub
curl -s -o release/stub/nvgt_android.bin -u "${{secrets.CIFTP}}" ftp://nvgt.gg/nvgt_android.bin
cd install
makensis nvgt.nsi
python3 upload_windows_installer.py ${{secrets.CIFTP}}
mac_package:
runs-on: macos-latest
needs: ["android_build", "linux_build", "mac_build", "windows_build"]
steps:
- uses: actions/checkout@v4
- name: package
run: |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz
mkdir linux_release
tar -xzf linux_release.tar.gz -C linux_release
mkdir windows_release
tar -xzf windows_release.tar.gz -C windows_release
tar -xzf mac_release.tar.gz -C release
cd doc
pip3 install --user -r requirements.txt --break-system-packages
cd OSL
python3 make_osl_document.py
cd ..
python3 docgen.py
cd ..
cp -r linux_release/lib release/lib_linux
cp linux_release/stub/* release/stub
cp -r windows_release/lib release/lib_windows
cp windows_release/stub/* release/stub
curl -s -o release/stub/nvgt_android.bin -u "${{secrets.CIFTP}}" ftp://nvgt.gg/nvgt_android.bin
cd install
python3 make_dmg.py ../release ${{secrets.CIFTP}}
linux_package:
runs-on: ubuntu-latest
needs: ["android_build", "linux_build", "mac_build", "windows_build"]
steps:
- uses: actions/checkout@v4
- name: set_version
run: |
python3 build/ci_set_version.py
- name: package
run: |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz
mkdir mac_release
tar -xzf mac_release.tar.gz -C mac_release
mkdir windows_release
tar -xzf windows_release.tar.gz -C windows_release
tar -xzf linux_release.tar.gz -C release
cd doc
pip3 install --user -r requirements.txt
cd OSL
python3 make_osl_document.py
cd ..
python3 docgen.py
cd ..
cp -r mac_release/lib release/lib_mac
cp mac_release/stub/* release/stub
cp -r windows_release/lib release/lib_windows
cp windows_release/stub/* release/stub
curl -s -o release/stub/nvgt_android.bin -u "${{secrets.CIFTP}}" ftp://nvgt.gg/nvgt_android.bin
cd release
tar -czf "../nvgt_$nvgt_version.tar.gz" *
cd ..
curl -u "${{secrets.CIFTP}}" -s -T "nvgt_$nvgt_version.tar.gz" ftp://nvgt.gg
final_package:
runs-on: ubuntu-latest
needs: ["windows_package", "mac_package", "linux_package"]
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- name: set_version
run: |
python3 build/ci_set_version.py
- name: publish
run: |
curl -H "X-Auth: ${{secrets.CIPHP}}" -s "https://nvgt.gg/ci/release_complete.php?ver=$nvgt_version"