99 status :
1010 required : true
1111 description : " Status (beta, stable)"
12+ publish_modrinth :
13+ required : true
14+ description : " Publish to Modrinth"
15+ default : " true"
1216
1317env :
1418 VERSION : ${{ github.event.inputs.tag }}-${{ github.event.inputs.status }}
1519
20+ concurrency :
21+ group : release-${{ github.event.inputs.tag }}
22+ cancel-in-progress : false
23+
1624jobs :
1725 build :
1826 runs-on : ubuntu-latest
1927
2028 steps :
2129 - name : Checkout repository
22- uses : actions/checkout@v2
30+ uses : actions/checkout@v4
2331
2432 - name : Set up JDK
25- uses : actions/setup-java@v2
33+ uses : actions/setup-java@v4
2634 with :
27- distribution : " temurin"
35+ distribution : temurin
2836 java-version : " 21"
2937
38+ - name : Set up Gradle
39+ uses : gradle/actions/setup-gradle@v4
40+
3041 - name : Make gradlew executable
3142 run : chmod +x gradlew
3243
3344 - name : Build with Gradle
34- run : ./gradlew build -PVERSION="${{ env.VERSION }}"
45+ run : ./gradlew clean build -PVERSION="${{ env.VERSION }}" --no-daemon
46+
47+ - name : Collect release artifacts
48+ run : |
49+ mkdir -p release-artifacts
50+ find modules -path "*/build/libs/*.jar" \
51+ ! -name "*-sources.jar" \
52+ ! -name "*-thin.jar" \
53+ ! -path "*/core/build/libs/*" \
54+ -exec cp {} release-artifacts/ \;
3555
3656 - name : Archive artifacts
3757 uses : actions/upload-artifact@v4
3858 with :
39- name : geyser-voice-artifacts
40- path : |
41- modules/paper/build/libs/
42- modules/velocity/build/libs/
43- modules/bungeecord/build/libs/
59+ name : geyservoice-release
60+ path : release-artifacts/*.jar
61+ if-no-files-found : error
4462
4563 publish_release :
4664 name : Publish release
@@ -52,47 +70,47 @@ jobs:
5270
5371 steps :
5472 - name : Checkout repository
55- uses : actions/checkout@v2
73+ uses : actions/checkout@v4
5674
5775 - name : Download artifacts
5876 uses : actions/download-artifact@v4
5977 with :
60- name : geyser-voice-artifacts
61- path : release-artifacts/
78+ name : geyservoice-release
79+ path : release-artifacts
6280
6381 - name : Create release
6482 if : github.event.inputs.status == 'stable'
65- uses : ncipollo/release-action@v1.13 .0
83+ uses : ncipollo/release-action@v1.14 .0
6684 with :
6785 prerelease : false
6886 tag : ${{ github.event.inputs.tag }}
69- artifacts : |
70- release-artifacts/**/*.jar
71- env :
72- GITHUB_REPOSITORY : AvionBlock/GeyserVoice
87+ artifacts : release-artifacts/*.jar
88+ artifactErrorsFailBuild : true
89+ allowUpdates : true
90+ replacesArtifacts : true
7391
7492 - name : Create pre-release
7593 if : github.event.inputs.status != 'stable'
76- uses : ncipollo/release-action@v1.13 .0
94+ uses : ncipollo/release-action@v1.14 .0
7795 with :
7896 prerelease : true
7997 tag : ${{ github.event.inputs.tag }}
80- artifacts : |
81- release-artifacts/**/*.jar
82- env :
83- GITHUB_REPOSITORY : AvionBlock/GeyserVoice
98+ artifacts : release-artifacts/*.jar
99+ artifactErrorsFailBuild : true
100+ allowUpdates : true
101+ replacesArtifacts : true
84102
85103 - name : Create Modrinth release
104+ if : github.event.inputs.publish_modrinth == 'true'
86105 uses : dsx137/modrinth-release-action@main
87106 env :
88- MODRINTH_TOKEN : ${{ secrets.MODRINTH_TOKEN }}
107+ MODRINTH_TOKEN : ${{ secrets.MODRINTH_TOKEN }}
89108 with :
90- name : GeyserVoice ${{ github.event.inputs.tag }}
91- project_id : WtPu56Wa
92- loaders : paper, purpur, velocity, bungeecord
93- game_versions : 1.20.2:1.21.10
94- version_number : ${{ github.event.inputs.tag }}
95- featured : ${{ github.event.inputs.status == 'stable' }}
96- version_type : ${{ github.event.inputs.status == 'stable' && 'release' || 'beta' }}
97- files : |
98- ./release-artifacts/**/*.jar
109+ name : GeyserVoice ${{ github.event.inputs.tag }}
110+ project_id : WtPu56Wa
111+ loaders : paper, purpur, velocity, bungeecord
112+ game_versions : 1.21.11:26.1
113+ version_number : ${{ github.event.inputs.tag }}
114+ featured : ${{ github.event.inputs.status == 'stable' }}
115+ version_type : ${{ github.event.inputs.status == 'stable' && 'release' || 'beta' }}
116+ files : release-artifacts/*.jar
0 commit comments