1
1
name : Project Info
2
2
run-name : " Project Info #${{ github.run_number }}"
3
-
4
- env :
5
- RELEASE_TYPE : " release"
6
-
7
3
on :
8
4
push :
9
5
branches :
@@ -13,6 +9,9 @@ concurrency:
13
9
group : ${{ github.workflow }}
14
10
cancel-in-progress : true
15
11
12
+ env :
13
+ RELEASE_TYPE : " release"
14
+
16
15
jobs :
17
16
info :
18
17
name : 🖥️ Project Info
28
27
exists : ${{ steps.check_tag.outputs.exists }}
29
28
30
29
steps :
31
- - name : 📁 Checkout
30
+ - name : Checkout
32
31
33
32
with :
34
33
fetch-depth : 0
@@ -136,6 +135,9 @@ jobs:
136
135
with :
137
136
file_path : " pakku-lock.json"
138
137
prop_path : " mc_versions"
138
+
139
+ - run : |
140
+ echo ${{steps.minecraft_version.outputs.value}}
139
141
140
142
- name : 📄 Changelog Parser
141
143
id : changelog
@@ -168,17 +170,162 @@ jobs:
168
170
if [ -n "${{ steps.read_diff.outputs.diff != '' }}" ]; then
169
171
echo "${{ steps.read_diff.outputs.diff }}" >> $GITHUB_STEP_SUMMARY
170
172
fi
173
+
174
+ build-modpack :
175
+ name : Build Modpack
176
+ runs-on : ubuntu-latest
177
+ needs : [info]
178
+ if : needs.info.outputs.exists != 'true'
179
+
180
+ steps :
181
+ - name : Checkout
182
+
183
+
184
+ - name : Replace strings
185
+ shell : bash
186
+ run : |
187
+ set +e
188
+
189
+ grooovy="./groovy/runConfig.json"
190
+ cat <<< $(jq '.debug = false' $grooovy) > $grooovy
171
191
172
- build :
192
+ VERSION=${{ needs.info.outputs.project_version }}
193
+ sed -i -e "s/DEV/${VERSION}/g" pakku.json
194
+ sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/gui_main_menu.txt
195
+
196
+ # - name: Cache pakku
197
+
198
+ # with:
199
+ # path: build/.cache
200
+ # key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
201
+ # restore-keys: ${{ runner.OS }}-pakku-cache-
202
+
203
+ - name : Export modpack
204
+ run : |
205
+ curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
206
+ java -jar pakku.jar export
207
+
208
+ - name : Rename artifact curseforge
209
+ run : |
210
+ cd ./build/curseforge/
211
+ mv *.zip $(basename -s .zip *.zip)-curseforge.zip
212
+
213
+ - name : Upload artifact CurseForge
214
+
215
+ with :
216
+ name : ${{ needs.info.outputs.project_full_name }}-curseforge
217
+ path : ./build/curseforge/${{ needs.info.outputs.project_full_name }}-curseforge.zip
218
+ if-no-files-found : error
219
+
220
+ - name : Rename artifact modrinth
221
+ run : |
222
+ cd ./build/modrinth/
223
+ mv *.mrpack $(basename -s .mrpack *.mrpack)-modrinth.mrpack
224
+
225
+ - name : Upload artifact modrinth
226
+
227
+ with :
228
+ name : ${{ needs.info.outputs.project_full_name }}-modrinth
229
+ path : ./build/modrinth/${{ needs.info.outputs.project_full_name }}-modrinth.mrpack
230
+ if-no-files-found : warn
231
+
232
+ build-server :
233
+ name : Build Server
234
+ runs-on : ubuntu-latest
173
235
needs : [info]
174
236
if : needs.info.outputs.exists != 'true'
175
- uses : ./.github/workflows/build.yml
176
- with :
177
- project_version : ${{ needs.info.outputs.project_version }}
178
- project_name : ${{ needs.info.outputs.project_name }}
179
- project_full_name : ${{ needs.info.outputs.project_full_name }}
180
- changelog : ${{ needs.info.outputs.changelog }}
181
- diff : ${{ needs.info.outputs.diff }}
182
- release_type : ${{ needs.info.outputs.release_type }}
183
- minecraft_version : ${{ needs.info.outputs.minecraft_version }}
184
- secrets : inherit
237
+
238
+ steps :
239
+ - name : Checkout
240
+
241
+
242
+ - name : Replace strings
243
+ shell : bash
244
+ run : |
245
+ set +e
246
+
247
+ grooovy="./groovy/runConfig.json"
248
+ cat <<< $(jq '.debug = false' $grooovy) > $grooovy
249
+
250
+ VERSION=${{ needs.info.outputs.project_version }}
251
+ sed -i -e "s/DEV/${VERSION}/g" pakku.json
252
+ sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/gui_main_menu.txt
253
+
254
+ # - name: Cache pakku
255
+
256
+ # with:
257
+ # path: build/.cache
258
+ # key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
259
+ # restore-keys: ${{ runner.OS }}-pakku-cache-
260
+
261
+ - name : Export modpack
262
+ run : |
263
+ mv -vf ./.pakku/server-overrides/* ./
264
+ curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
265
+ java -jar pakku.jar export
266
+
267
+ - name : Rename artifact server
268
+ run : |
269
+ cd ./build/serverpack/
270
+ mv *.zip $(basename -s .zip *.zip)-serverpack.zip
271
+
272
+ - name : Upload artifact server
273
+
274
+ with :
275
+ name : ${{ needs.info.outputs.project_full_name }}-serverpack
276
+ path : ./build/serverpack/${{ needs.info.outputs.project_full_name }}-serverpack.zip
277
+ if-no-files-found : error
278
+
279
+ build-multimc :
280
+ name : Build MultiMC
281
+ runs-on : ubuntu-latest
282
+ needs : [info]
283
+ if : needs.info.outputs.exists != 'true'
284
+
285
+ steps :
286
+ - name : Checkout
287
+
288
+
289
+ - name : Replace strings
290
+ shell : bash
291
+ run : |
292
+ set +e
293
+
294
+ grooovy="./groovy/runConfig.json"
295
+ cat <<< $(jq '.debug = false' $grooovy) > $grooovy
296
+
297
+ VERSION=${{ needs.info.outputs.project_version }}
298
+ sed -i -e "s/DEV/${VERSION}/g" pakku.json
299
+ sed -i -e "s/DEV/${VERSION}/g" config/fancymenu/customization/gui_main_menu.txt
300
+ sed -i -e "s/DEV/${VERSION}/g" .pakku/multimc-overrides/instance.cfg
301
+
302
+ # - name: Cache pakku
303
+
304
+ # with:
305
+ # path: build/.cache
306
+ # key: ${{ runner.OS }}-pakku-cache-${{ hashFiles('build/.cache/') }}
307
+ # restore-keys: ${{ runner.OS }}-pakku-cache-
308
+
309
+ - name : Export
310
+ run : |
311
+ curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J
312
+ java -jar pakku.jar --debug fetch
313
+ java -jar pakku.jar --debug export
314
+
315
+ - name : Move files
316
+ run : |
317
+ ls
318
+ mkdir -p .pakku/multimc-overrides/flame
319
+ mv -vf ./build/.cache/curseforge/manifest.json .pakku/multimc-overrides/flame/manifest.json
320
+ mv -vf ./build/.cache/curseforge/overrides .pakku/multimc-overrides/.minecraft
321
+ mv -vf ./mods .pakku/multimc-overrides/.minecraft/mods
322
+ cd .pakku/multimc-overrides/
323
+
324
+ zip -r ${{ needs.info.outputs.project_full_name }}-multimc.zip icon.png mmc-pack.json instance.cfg .minecraft/ flame/
325
+
326
+ - name : Upload zip multimc
327
+
328
+ with :
329
+ name : ${{ needs.info.outputs.project_full_name }}-multimc
330
+ path : .pakku/multimc-overrides/${{ needs.info.outputs.project_full_name }}-multimc.zip
331
+ if-no-files-found : error
0 commit comments