-
-
Notifications
You must be signed in to change notification settings - Fork 10
632 lines (544 loc) · 24.3 KB
/
github_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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
name: Create GitHub Release after GitLab tag mirror
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
preparations:
runs-on: ubuntu-latest
# OUTPUTS
outputs:
version: ${{ steps.tag.outputs.tag }}
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# EXTRACT TAG FROM PUSH
- name: Get tag
id: tag
uses: tj-actions/[email protected]
- name: Use tag
run: echo ${{steps.tag.outputs.tag}}
jar:
needs: preparations
runs-on: ubuntu-latest
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Build release
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test
# UPLOAD ARTIFACTS
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: build-artifacts
path: |
serverpackcreator-api/build
serverpackcreator-app/build
serverpackcreator-cli/build
serverpackcreator-gui/build
serverpackcreator-updater/build
serverpackcreator-web/build
serverpackcreator-web-frontend/dist
serverpackcreator-plugin-example/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Rename JAR and Plugin
run: |
mv serverpackcreator-app/build/libs/serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar
mv serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar
# UPLOAD ARTIFACTS
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: jar-release-artifacts
path: |
serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar
serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
mac-01:
runs-on: macos-latest
needs: preparations
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Build installer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace
./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test
- name: List After Build
run: ls serverpackcreator-app/build/dist/
- name: Rename MacOs
run: mv serverpackcreator-app/build/dist/ServerPackCreator*.pkg serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg
- name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: mac-01-release-artifacts
path: |
serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Installer Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: mac-01-installer-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
windows-01:
runs-on: windows-latest
needs: preparations
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Prepare wix-toolset
run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Build installer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace
./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test
- name: List After Build
run: ls serverpackcreator-app/build/dist/
- name: Rename Windows
run: mv serverpackcreator-app/build/dist/ServerPackCreator*.msi serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi
- name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: windows-01-release-artifacts
path: |
serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: windows-01-installer-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
windows-02:
runs-on: windows-latest
needs: preparations
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
id: java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Prepare wix-toolset
run: echo "${env:path};${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Prepare
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build :serverpackcreator-app:copyDependencies :serverpackcreator-app:copyJar :serverpackcreator-app:cleanTmpPackager --info --full-stacktrace
- name: Build Image
run: |
jpackage `
--app-version "${{ needs.preparations.outputs.version }}" `
--copyright "Copyright (C) 2024 Griefed" `
--description "Create server packs from Minecraft Forge, NeoForge, Fabric, Quilt or LegacyFabric modpacks." `
--dest "serverpackcreator-app\build\dist" `
--icon "serverpackcreator-app\jpackagerResources\app.ico" `
--input "serverpackcreator-app\build\jars" `
--java-options "-Dfile.encoding=UTF-8" `
--java-options "-Dlog4j2.formatMsgNoLookups=true" `
--main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt `
--main-jar serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar `
--name ServerPackCreator `
--resource-dir "serverpackcreator-app\jpackagerResources" `
--runtime-image "${{ steps.java.outputs.path }}" `
--temp "serverpackcreator-app\build\tmp\jpackager" `
--type "app-image" `
--vendor "griefed.de" `
--verbose
- name: List
run: dir serverpackcreator-app\build\dist
- name: Archive
uses: thedoctor0/[email protected]
with:
type: 'zip'
directory: serverpackcreator-app/build/dist
path: 'ServerPackCreator'
filename: 'ServerPackCreator-Portable-Windows.zip'
- name: Rename Archive
run: mv serverpackcreator-app/build/dist/ServerPackCreator-Portable-Windows.zip serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip
- name: List
run: dir serverpackcreator-app\build\dist
- name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: windows-02-release-artifacts
path: |
serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
# UPLOAD OS-SPECIFICS
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: windows-02-installer-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
ubuntu-01:
runs-on: ubuntu-latest
needs: preparations
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Build installer
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace
./gradlew :serverpackcreator-app:jpackage -Pversion="${{ needs.preparations.outputs.version }}" --info --full-stacktrace -x :serverpackcreator-api:jvmTest -x :serverpackcreator-web:test
- name: List After Build
run: ls serverpackcreator-app/build/dist/
- name: Rename
run: mv serverpackcreator-app/build/dist/serverpackcreator*.deb serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb
- name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ubuntu-01-release-artifacts
path: |
serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ubuntu-01-installer-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
ubuntu-02:
runs-on: ubuntu-latest
needs: preparations
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# BUILD PROJECT AND PUBLISH
- name: Set up JDK 21
id: java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Prepare
env:
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" generateLicenseReport --info --full-stacktrace
./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build :serverpackcreator-app:copyDependencies :serverpackcreator-app:copyJar :serverpackcreator-app:cleanTmpPackager --info --full-stacktrace
- name: Build Image
run: |
jpackage \
--app-version "${{ needs.preparations.outputs.version }}" \
--copyright "Copyright (C) 2024 Griefed" \
--description "Create server packs from Minecraft Forge, NeoForge, Fabric, Quilt or LegacyFabric modpacks." \
--dest serverpackcreator-app/build/dist \
--icon serverpackcreator-app/jpackagerResources/app.png \
--input serverpackcreator-app/build/jars \
--java-options "-Dfile.encoding=UTF-8" \
--java-options "-Dlog4j2.formatMsgNoLookups=true" \
--main-class de.griefed.serverpackcreator.app.ServerPackCreatorKt \
--main-jar serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar \
--name ServerPackCreator \
--resource-dir serverpackcreator-app/jpackagerResources \
--runtime-image $JAVA_HOME \
--temp serverpackcreator-app/build/tmp/jpackager \
--type "app-image" \
--vendor "griefed.de" \
--verbose
- name: List
run: ls -ahl serverpackcreator-app/build/dist
- name: Create AppImage
run: |
mkdir -p serverpackcreator-app/build/dist/ServerPackCreator.AppDir/usr/share/applications && \
mkdir -p serverpackcreator-app/build/dist/ServerPackCreator.AppDir/usr/icons/hicolor/512x512 && \
mkdir -p serverpackcreator-app/build/dist/ServerPackCreator.AppDir/usr/icons/hicolor/scalable && \
cp -rf serverpackcreator-app/build/dist/ServerPackCreator/* \
serverpackcreator-app/build/dist/ServerPackCreator.AppDir && \
cp serverpackcreator-app/jpackagerResources/appimage.desktop \
serverpackcreator-app/build/dist/ServerPackCreator.AppDir/usr/share/applications/ServerPackCreator.desktop && \
cp serverpackcreator-app/jpackagerResources/appimage.png \
serverpackcreator-app/build/dist/ServerPackCreator.AppDir/usr/icons/hicolor/512x512/ServerPackCreator.png && \
cp serverpackcreator-app/jpackagerResources/appimage.svg \
serverpackcreator-app/build/dist/ServerPackCreator.AppDir/usr/icons/hicolor/scalable/ServerPackCreator.svg && \
cd serverpackcreator-app/build/dist/ServerPackCreator.AppDir && \
ln -s bin/ServerPackCreator \
AppRun && \
ln -s usr/share/applications/ServerPackCreator.desktop \
ServerPackCreator.desktop && \
ln -s usr/icons/hicolor/512x512/ServerPackCreator.png \
ServerPackCreator.png && \
ln -s usr/icons/hicolor/scalable/ServerPackCreator.svg \
ServerPackCreator.svg && \
cd .. && \
curl \
-L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage \
-o appimagetool.AppImage && \
chmod +x appimagetool.AppImage && \
./appimagetool.AppImage --appimage-extract && \
export PATH=./squashfs-root/usr/bin:${PATH} && \
appimagetool \
ServerPackCreator.AppDir \
ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage
- name: Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ubuntu-02-release-artifacts
path: |
serverpackcreator-app/build/dist/ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
# UPLOAD OS-SPECIFICS
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ubuntu-02-installer-artifacts
path: |
serverpackcreator-app/build
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
release:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [preparations, jar, mac-01, windows-01, windows-02, ubuntu-01, ubuntu-02]
steps:
# GET THE LATEST CODE
- name: Checkout latest code
uses: actions/[email protected]
with:
fetch-depth: 0
# GET RELEASE INFO
- name: Get Release Info
run: |
curl --header \
'PRIVATE-TOKEN: ${{ secrets.GITLAB_TOKEN }}' \
'https://git.griefed.de/api/v4/projects/63/releases/${{ needs.preparations.outputs.version }}' >> version.json
# GET DESCRIPTION
- name: Extract version changelog
uses: sergeysova/[email protected]
id: description
with:
cmd: "jq .description version.json -r | sed -e 's/\\n/\\n/g' > description.txt"
multiline: true
- name: General Info
id: info
uses: jaywcjlove/[email protected]
with:
path: misc/INFO.md
- name: Dafuq # Otherwise we wouldn't be able to work with the file. Because reasons...
run: sudo chown $USER description.txt
- name: Check length and truncate if needed
run: |
if [[ $(wc -c description.txt | awk '{print $1}') -ge 10000 ]]; then
truncate -s 10000 description.txt
printf "\n\n............\n\nRelease notes truncated. For more details, see the [CHANGELOG](https://github.com/Griefed/ServerPackCreator/blob/${{ needs.preparations.outputs.version }}/CHANGELOG.md).\n\n" >> description.txt
fi
- name: Append Release Info
uses: DamianReeves/[email protected]
with:
path: description.txt
write-mode: append
contents: |
${{ steps.info.outputs.content }}
- uses: actions/download-artifact@v4
with:
name: jar-release-artifacts
- uses: actions/download-artifact@v4
with:
name: mac-01-release-artifacts
- uses: actions/download-artifact@v4
with:
name: windows-01-release-artifacts
- uses: actions/download-artifact@v4
with:
name: windows-02-release-artifacts
- uses: actions/download-artifact@v4
with:
name: ubuntu-01-release-artifacts
- uses: actions/download-artifact@v4
with:
name: ubuntu-02-release-artifacts
# GENERATE RELEASE
- name: Create Release
id: create_release
uses: softprops/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ needs.preparations.outputs.version }}
name: Release ${{ needs.preparations.outputs.version }}
body_path: description.txt
draft: false
prerelease: false
fail_on_unmatched_files: false
files: |
ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-MacOS.pkg
ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Windows.msi
ServerPackCreator-${{ needs.preparations.outputs.version }}-Installer-Ubuntu-amd64.deb
ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Windows.zip
ServerPackCreator-${{ needs.preparations.outputs.version }}-Portable-Linux-x86_64.AppImage
serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar
serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar
news:
runs-on: ubuntu-latest
needs: [preparations, release]
steps:
- name: Get current date
id: date
run: echo "::set-output name=today::$(date +'%Y-%m-%dT%H:%M:%S')"
- name: Post WebHook Message
run: |
curl -L --output ./discord.sh https://raw.githubusercontent.com/ChaoticWeg/discord.sh/master/discord.sh
chmod a+x ./discord.sh
./discord.sh \
--webhook-url="${{ secrets.WEBHOOK_URL }}" \
--username "$GITHUB_REPOSITORY" \
--avatar "https://i.griefed.de/images/2020/11/18/Prosper_Docker_300x300.png" \
--text "There's been a new release for $GITHUB_REPOSITORY. The new version is ${{ needs.preparations.outputs.version }} and is available at <$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/${{ needs.preparations.outputs.version }}>" \
--title "New $GITHUB_REPOSITORY Release" \
--description "There's been a new release for $GITHUB_REPOSITORY. The new version is ${{ needs.preparations.outputs.version }} and is available at $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/${{ needs.preparations.outputs.version }}" \
--color "0xC0FFEE" \
--url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/${{ needs.preparations.outputs.version }}" \
--author "Griefed" \
--author-url "$GITHUB_SERVER_URL/Griefed" \
--author-icon "https://i.griefed.de/images/2022/01/21/sam_1500x1500.th.jpg" \
--thumbnail "https://i.griefed.de/images/2021/05/08/app.png" \
--field "Author;[Griefed]($GITHUB_SERVER_URL/Griefed)" \
--field "Platform;[GitHub]($GITHUB_SERVER_URL)" \
--footer "Released at ${{ steps.date.outputs.today }}" \
--footer-icon "https://i.griefed.de/images/2022/01/21/start_generation.png"
pages:
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build documentation
run: ./gradlew :serverpackcreator-api:dokkaHtml -Pversion="${{ needs.preparations.outputs.version }}" --full-stacktrace --info -x test
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: serverpackcreator-api/build/dokka/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
# DEPLOY TO GH-PAGES
- name: Deploy to GitHub-Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: serverpackcreator-api/build/dokka