File tree Expand file tree Collapse file tree 4 files changed +34
-52
lines changed Expand file tree Collapse file tree 4 files changed +34
-52
lines changed Original file line number Diff line number Diff line change 1- # This workflow uses actions that are not certified by GitHub.
2- # They are provided by a third-party and are governed by
3- # separate terms of service, privacy policy, and support
4- # documentation.
5- # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6- # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
7-
8- name : Java CI with Gradle
1+ name : Build
92on : [ pull_request, push ]
103jobs :
114 build :
125 runs-on : ubuntu-latest
136 steps :
14- - uses : actions/checkout@v4
15- - name : Set up JDK 21
7+ - name : Checkout sources
8+ uses : actions/checkout@v4
9+ - name : Setup Java
1610 uses : actions/setup-java@v4
1711 with :
18- java-version : ' 21'
1912 distribution : ' temurin'
13+ java-version : 21
14+ - name : Setup Gradle
15+ uses : gradle/actions/setup-gradle@v4
2016 - name : Build with Gradle
21- uses : gradle/actions/setup-gradle@v3
22- with :
23- arguments : shadowJar
24- - name : Upload a Build Artifact
25- uses : actions/upload-artifact@v4
26- with :
27- path : build/libs/*
28- if-no-files-found : error
17+ run : ./gradlew build
18+ - name : Test with Gradle
19+ run : ./gradlew test
Original file line number Diff line number Diff line change 11name : Hangar Publish
2-
32on :
43 release :
5- types :
6- - prereleased
7- - released
8-
4+ types : [ prereleased, released ]
95jobs :
106 build :
117 env :
128 HANGAR_API_TOKEN : ${{ secrets.HANGAR_API_TOKEN }}
139 runs-on : ubuntu-latest
1410 steps :
15- - uses : actions/checkout@v4
16- - name : Set up JDK 21
11+ - name : Checkout sources
12+ uses : actions/checkout@v4
13+ - name : Setup Java
1714 uses : actions/setup-java@v4
1815 with :
19- java-version : ' 21'
2016 distribution : ' temurin'
17+ java-version : 21
18+ - name : Setup Gradle
19+ uses : gradle/actions/setup-gradle@v4
2120 - name : Publish with Gradle to Hangar
22- uses : gradle/actions/setup-gradle@v3
23- with :
24- arguments : publishAllPublicationsToHangar
21+ run : ./gradlew publishAllPublicationsToHangar
Original file line number Diff line number Diff line change 11name : Maven Publish
2-
32on :
43 release :
5- types :
6- - prereleased
7- - released
8-
4+ types : [ prereleased, released ]
95jobs :
106 build :
117 env :
128 REPOSITORY_USER : ${{ secrets.REPOSITORY_USER }}
139 REPOSITORY_TOKEN : ${{ secrets.REPOSITORY_TOKEN }}
1410 runs-on : ubuntu-latest
1511 steps :
16- - uses : actions/checkout@v4
17- - name : Set up JDK 21
12+ - name : Checkout sources
13+ uses : actions/checkout@v4
14+ - name : Setup Java
1815 uses : actions/setup-java@v4
1916 with :
20- java-version : ' 21'
2117 distribution : ' temurin'
18+ java-version : 21
19+ - name : Setup Gradle
20+ uses : gradle/actions/setup-gradle@v4
2221 - name : Publish with Gradle to Repository
23- uses : gradle/actions/setup-gradle@v3
24- with :
25- arguments : publish
22+ run : ./gradlew publish
Original file line number Diff line number Diff line change 11name : Modrinth Publish
2-
32on :
43 release :
5- types :
6- - prereleased
7- - released
8-
4+ types : [ prereleased, released ]
95jobs :
106 build :
117 env :
128 MODRINTH_TOKEN : ${{ secrets.MODRINTH_TOKEN }}
139 runs-on : ubuntu-latest
1410 steps :
15- - uses : actions/checkout@v4
16- - name : Set up JDK 21
11+ - name : Checkout sources
12+ uses : actions/checkout@v4
13+ - name : Setup Java
1714 uses : actions/setup-java@v4
1815 with :
19- java-version : ' 21'
2016 distribution : ' temurin'
17+ java-version : 21
18+ - name : Setup Gradle
19+ uses : gradle/actions/setup-gradle@v4
2120 - name : Publish with Gradle to Modrinth
22- uses : gradle/actions/setup-gradle@v3
23- with :
24- arguments : modrinth
21+ run : ./gradlew modrinth
You can’t perform that action at this time.
0 commit comments