@@ -5,38 +5,58 @@ on: [ push, pull_request ]
55jobs :
66 build :
77 runs-on : ubuntu-latest
8- strategy :
9- matrix :
10- java : [ 11, 17 ]
11- fail-fast : true
128 steps :
139 - name : Checkout
1410 uses : actions/checkout@v3.0.0
15- - name : Set up JDK ${{ matrix.java }}
11+ - name : Set up JDK
1612 uses : actions/setup-java@v3.0.0
1713 with :
1814 distribution : adopt
19- java-version : ${{ matrix.java }}
15+ java-version : 11
2016 - name : Build LimboAuth
2117 run : ./gradlew build
2218 - name : Upload LimboAuth
2319 uses : actions/upload-artifact@v3.0.0
2420 with :
25- name : LimboAuth Built On ${{ matrix.java }} JDK
21+ name : LimboAuth
2622 path : " build/libs/limboauth*.jar"
2723 - uses : dev-drprasad/delete-tag-and-release@v0.2.0
2824 if : ${{ github.event_name == 'push' }}
2925 with :
3026 delete_release : true
31- tag_name : dev-build-jdk-${{ matrix.java }}
27+ tag_name : dev-build
3228 env :
3329 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30+ - name : Find git version
31+ id : git-version
32+ run : echo "id=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
33+ - name : Find correct JAR
34+ if : ${{ github.event_name == 'push' }}
35+ id : find-jar
36+ run : |
37+ output="$(find build/libs/ ! -name "*-javadoc.jar" ! -name "*-sources.jar" -type f -printf "%f\n")"
38+ echo "::set-output name=jarname::$output"
3439 - name : Release the build
3540 if : ${{ github.event_name == 'push' }}
3641 uses : ncipollo/release-action@v1
3742 with :
38- artifacts : " build/libs/limboauth*. jar"
43+ artifacts : build/libs/${{ steps.find- jar.outputs.jarname }}
3944 body : ${{ join(github.event.commits.*.message, '\n') }}
4045 prerelease : true
41- name : JDK ${{ matrix.java }} Dev-build
42- tag : dev-build-jdk-${{ matrix.java }}
46+ name : Dev-build ${{ steps.git-version.outputs.id }}
47+ tag : dev-build
48+ - name : Upload to Modrinth
49+ if : ${{ github.event_name == 'push' }}
50+ uses : RubixDev/modrinth-upload@v1.0.0
51+ with :
52+ token : ${{ secrets.MODRINTH_TOKEN }}
53+ file_path : build/libs/${{ steps.find-jar.outputs.jarname }}
54+ name : Dev-build ${{ steps.git-version.outputs.id }}
55+ version : ${{ steps.git-version.outputs.id }}
56+ changelog : ${{ join(github.event.commits.*.message, '\n') }}
57+ relations : TZOteSf2:required
58+ game_versions : 1.7.2
59+ release_type : beta
60+ loaders : velocity
61+ featured : false
62+ project_id : 4iChqdl8
0 commit comments