1111 - ' release/**'
1212
1313env :
14- BUILD_JAVA_VERSION : ' 21 '
14+ BUILD_JAVA_VERSION : ' 25 '
1515
1616jobs :
1717 test :
2121 fail-fast : false
2222 matrix :
2323 os : [ ubuntu-latest, windows-latest ]
24- java : [ '8', '11', '17', '21' ]
24+ java : [ '8', '11', '17', '21', '25' ]
2525 arch : [ 'x64' ]
2626 include :
2727 - os : windows-latest
@@ -32,10 +32,12 @@ jobs:
3232
3333 steps :
3434 - name : Checkout
35- uses : actions/checkout@v4
35+ uses : actions/checkout@v6
36+ with :
37+ persist-credentials : false
3638
3739 - name : Set up JDK ${{ matrix.java }}
38- uses : actions/setup-java@v4
40+ uses : actions/setup-java@v5
3941 with :
4042 java-version : ${{ matrix.java }}
4143 architecture : ${{ matrix.arch }}
@@ -45,15 +47,18 @@ jobs:
4547 - name : Build with Maven
4648 shell : bash
4749 run : |
48- TEST_EXCLUSIONS=$([ '${{ matrix.java }}' == '21' ] && echo "" || echo "concurrency" )
49- # don't exit immediately
50- set +e
50+ TEST_EXCLUSIONS=$([ '${{ matrix.java }}' == '25' ] && echo "" || echo "concurrency" )
5151 mvn verify \
5252 -B \
5353 -Dsurefire.rerunFailingTestsCount=2 \
5454 -"Dgpg.skip" \
5555 -DexcludedGroups="${TEST_EXCLUSIONS}" \
5656 jacoco:report
57+
58+ - name : Copy build reports
59+ shell : bash
60+ if : always() # always run even if the previous step fails
61+ run : |
5762 cd target
5863 mv jacoco.exec jacoco-${{ matrix.java }}-${{ matrix.arch }}-${{ matrix.os }}.exec
5964 mv surefire-reports surefire-reports-${{ matrix.java }}-${{ matrix.arch }}-${{ matrix.os }}
@@ -97,10 +102,12 @@ jobs:
97102 needs : test
98103 steps :
99104 - name : Checkout
100- uses : actions/checkout@v4
105+ uses : actions/checkout@v6
106+ with :
107+ persist-credentials : false
101108
102109 - name : Set up JDK
103- uses : actions/setup-java@v4
110+ uses : actions/setup-java@v5
104111 with :
105112 java-version : ${{ env.BUILD_JAVA_VERSION }}
106113 distribution : temurin
@@ -133,7 +140,7 @@ jobs:
133140
134141 - name : Archive PR number
135142 if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'dnsjava'
136- uses : actions/upload-artifact@v4
143+ uses : actions/upload-artifact@v6
137144 with :
138145 name : pr_number
139146 path : pr_number.txt
@@ -145,8 +152,9 @@ jobs:
145152 if : github.event_name == 'push' || github.event.pull_request.head.repo.owner.login == 'dnsjava'
146153 steps :
147154 - name : Checkout
148- uses : actions/checkout@v4
155+ uses : actions/checkout@v6
149156 with :
157+ persist-credentials : false
150158 # for Sonar
151159 fetch-depth : 0
152160
@@ -156,9 +164,8 @@ jobs:
156164 cache : maven
157165
158166 - name : Run codecov
159- uses : codecov/codecov-action@v4
160- env :
161- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
167+ # v5.5.2
168+ uses : codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
162169
163170 # doesn't work with PRs from forks, see
164171 # https://portal.productboard.com/sonarsource/1-sonarcloud/c/50-sonarcloud-analyzes-external-pull-request
@@ -167,30 +174,34 @@ jobs:
167174 env :
168175 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
169176 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
170- run : mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
177+ run : mvn -B properties:read-project-properties org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
171178
172179 release :
173180 if : github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')
174181 needs : test
175182 runs-on : ubuntu-latest
176183 steps :
177- - uses : actions/checkout@v4
184+ - name : Checkout
185+ uses : actions/checkout@v6
186+ with :
187+ persist-credentials : false
178188
179189 - name : Set up JDK ${{ env.BUILD_JAVA_VERSION }}
180- uses : actions/setup-java@v4
190+ uses : actions/setup-java@v5
181191 with :
182192 java-version : ${{ env.BUILD_JAVA_VERSION }}
183193 architecture : ' x64'
184194 distribution : temurin
185195 cache : maven
186- server-id : ossrh
196+ server-id : central
187197 server-username : SONATYPE_USER
188198 server-password : SONATYPE_PW
189199
190200 - name : Release to Maven Central
191201 env :
192202 SONATYPE_USER : ${{ secrets.SONATYPE_USER }}
193203 SONATYPE_PW : ${{ secrets.SONATYPE_PW }}
204+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PW }}
194205 run : |
195206 cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
196207 gpg --list-secret-keys --keyid-format LONG
@@ -205,10 +216,8 @@ jobs:
205216 mvn \
206217 --no-transfer-progress \
207218 --batch-mode \
208- -Dgpg.passphrase="${{ secrets.GPG_PW }}" \
209219 -DperformRelease=true \
210220 -DskipTests \
211- -Dmaven.test.skip.exec \
212221 -Dcheckstyle.skip \
213222 -Dspotless.check.skip=true \
214223 -Danimal.sniffer.skip=true \
0 commit comments