77
88jobs :
99 publish :
10- name : Maven Artifact Publisher (JDK 11 )
10+ name : Maven Artifact Publisher (JDK 17 )
1111 runs-on : ubuntu-latest
12- env :
13- AUTORELEASE_ARTIFACT : ${{ secrets.AUTORELEASE_ARTIFACT }}
14- SKIP_JAR_DEPLOYMENT : ${{ secrets.SKIP_JAR_DEPLOYMENT }}
15- MAVEN_CACHE_KEY : ${{ secrets.MAVEN_CACHE_KEY }}
1612 steps :
1713 - name : Check out source code
18- uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2
19- - name : Install JDK 11
20- uses : actions/setup-java@8764a52df183aa0ccea74521dfd9d506ffc7a19a # v2
14+ uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
15+ - name : Install JDK 17
16+ uses : actions/setup-java@860f60056505705214d223b91ed7a30f173f6142 # v3.3.0
2117 with :
18+ cache : maven
2219 distribution : ' adopt'
23- java-version : 11
20+ java-version : 17
2421 # If running locally in act, install Maven
2522 - name : Set up Maven if needed
2623 if : ${{ env.ACT }}
2724 uses : stCarolas/setup-maven@1d56b37995622db66cce1214d81014b09807fb5a # v4
2825 with :
2926 maven-version : 3.6.3
30- - name : Set up Maven cache
31- uses : actions/cache@0781355a23dac32fd3bac414512f4b903437991a # v2
32- if : ${{ env.MAVEN_CACHE_KEY }}
33- with :
34- path : ~/.m2
35- key : freelibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-${{ hashFiles('**/pom.xml') }}
36- restore-keys : freelibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-
37- - name : Set autorelease config
38- if : env.AUTORELEASE_ARTIFACT == null
39- run : echo "AUTORELEASE_ARTIFACT=false" >> $GITHUB_ENV
40- - name : Set Jar deployment config
41- if : env.SKIP_JAR_DEPLOYMENT == null
42- run : echo "SKIP_JAR_DEPLOYMENT=false" >> $GITHUB_ENV
4327 - name : Optionally, login to Docker repository
4428 uses : docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a # v1.8.0
4529 env :
@@ -55,11 +39,11 @@ jobs:
5539 gpg_passphrase : ${{ secrets.BUILD_PASSPHRASE }}
5640 nexus_username : ${{ secrets.SONATYPE_USERNAME }}
5741 nexus_password : ${{ secrets.SONATYPE_PASSWORD }}
58- maven_profiles : release,optional-env-vars
42+ maven_profiles : release
5943 maven_args : >
60- -Drevision=${{ github.event.release.tag_name }} -DautoReleaseAfterClose=${{ env.AUTORELEASE_ARTIFACT }}
44+ -Drevision=${{ github.event.release.tag_name }}
6145 -ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error -Ddocker.showLogs=true
62- -DskipNexusStagingDeployMojo=${{ env.SKIP_JAR_DEPLOYMENT }}
46+ -DskipNexusStagingDeployMojo=true -DautoReleaseAfterClose=false -Dgpg.skip=true
6347 -Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
6448 -Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
6549 -Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}
0 commit comments