1-
21# This workflow will build a Java project with Gradle
32# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
43
109 runs-on : ubuntu-latest
1110 if : " !contains(github.event.commits[0].message, '[ci-skip]')"
1211 steps :
13- - uses : actions/checkout@v2
14- - uses : gradle/wrapper-validation-action@v1
15- - name : Set up JDK 8
16- uses : actions/setup-java@v2
17- with :
18- distribution : temurin
19- java-version : 8
20- cache : gradle
21- - name : Grant execute permission for gradlew
22- run : chmod +x gradlew
23- - name : Test with Gradle
24- run : ./gradlew test
25- - name : Build with Gradle
26- run : ./gradlew build
27- - name : Upload artifacts
28- uses : " actions/upload-artifact@v2.2.3"
29- with :
30- name : " IridiumSkyblock"
31- path : " build/libs/IridiumColorAPI-*.jar"
12+ - uses : actions/checkout@v3.0.0
13+ - uses : gradle/wrapper-validation-action@v1
14+ - name : Set up JDK 17
15+ uses : actions/setup-java@v3.0.0
16+ with :
17+ distribution : temurin
18+ java-version : 17
19+ cache : gradle
20+ - name : Grant execute permission for gradlew
21+ run : chmod +x gradlew
22+ - name : Test with Gradle
23+ run : ./gradlew test
24+ - name : Build with Gradle
25+ run : ./gradlew build
26+ - name : Upload artifacts
27+ uses : " actions/upload-artifact@v2.2.3"
28+ with :
29+ name : " IridiumColorApi"
30+ path : " build/libs/IridiumColorApi-*.jar"
31+ upload :
32+ needs : build
33+ runs-on : ubuntu-latest
34+ if : " contains(github.event.commits[0].message, 'Version Increment')"
35+ steps :
36+ - uses : actions/checkout@v2
37+ - uses : thecodemonkey/action-get-gradle-version@master
38+ id : version
39+ with :
40+ file : " build.gradle.kts"
41+ - uses : actions/download-artifact@v3.0.2
42+ with :
43+ name : " IridiumColorApi"
44+ path : " ./"
45+ - name : Publish to Nexus
46+ uses : sonatype-nexus-community/nexus-repo-github-action@master
47+ with :
48+ serverUrl : " https://nexus.iridiumdevelopment.net/"
49+ username : " ${{ secrets.NEXUS_USERNAME }}"
50+ password : " ${{ secrets.NEXUS_PASSWORD }}"
51+ format : " maven2"
52+ repository : " maven-releases"
53+ coordinates : " groupId=com.iridium artifactId=IridiumColorApi version=${{steps.version.outputs.version}} generate-pom=on"
54+ assets : " extension=jar"
55+ filename : " IridiumColorApi-*.jar"
0 commit comments