File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
66# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
77
8- name : Publish to Sonatype
8+ name : Publish Central Portal
99
10- on :
10+ on :
1111 workflow_dispatch :
12-
12+
1313permissions :
1414 contents : read
1515
@@ -20,11 +20,12 @@ jobs:
2020
2121 steps :
2222 - uses : actions/checkout@v3
23- - name : Set up JDK 11
23+ - name : Set up JDK 17
2424 uses : actions/setup-java@v3
2525 with :
26- java-version : ' 11 '
26+ java-version : ' 17 '
2727 distribution : ' temurin'
28+ cache : gradle
2829 - name : Restore gradle.properties
2930 env :
3031 GRADLE_PROPERTIES : ${{ secrets.GRADLE_PROPERTIES }}
4041 run : |
4142 mkdir /home/runner/.gnupg
4243 echo -n "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > /home/runner/.gnupg/secring.gpg
43- - name : List keys
44- run : gpg -K
45- - name : Build with Gradle
46- uses : gradle/gradle-build-action@v2
44+ - name : Execute Gradle publish
45+ run : ./gradlew clean build publish --refresh-dependencies --info
46+ - name : Upload test reports
47+ uses : actions/upload-artifact@v4
48+ if : always()
4749 with :
48- arguments : build publish
50+ name : test-reports
51+ path : " **/build/reports/*"
52+ retention-days : 5
You can’t perform that action at this time.
0 commit comments