@@ -20,35 +20,35 @@ jobs:
20
20
runs-on : ubuntu-latest
21
21
strategy :
22
22
matrix :
23
- version : [17,20 ]
23
+ version : [17,21,23 ]
24
24
25
25
steps :
26
- - uses : actions/checkout@v3
26
+ - uses : actions/checkout@v4
27
27
- name : Set up JDK ${{ matrix.version }}
28
- uses : actions/setup-java@v3
28
+ uses : actions/setup-java@v4
29
29
with :
30
30
java-version : ${{ matrix.version }}
31
31
distribution : ' temurin'
32
32
cache : maven
33
33
- name : Build with Maven, Java ${{ matrix.version }}
34
- run : mvn -B package -Dmaven.compiler.source=${{ matrix.version }} -Dmaven.compiler.target=${{ matrix.version }}
34
+ run : ./mvnw -B verify -Dmaven.compiler.source=${{ matrix.version }} -Dmaven.compiler.target=${{ matrix.version }}
35
35
36
36
sonar-build :
37
37
needs : build
38
38
runs-on : ubuntu-latest
39
-
39
+
40
40
steps :
41
- - uses : actions/checkout@v3
41
+ - uses : actions/checkout@v4
42
42
with :
43
43
fetch-depth : 0
44
-
44
+
45
45
- name : Set up JDK 17 for Sonar-build
46
- uses : actions/setup-java@v3
46
+ uses : actions/setup-java@v4
47
47
with :
48
48
java-version : ' 17'
49
49
distribution : ' temurin'
50
50
cache : maven
51
-
51
+
52
52
- name : Cache SonarCloud packages
53
53
uses : actions/cache@v3
54
54
with :
@@ -68,16 +68,16 @@ jobs:
68
68
env :
69
69
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
70
70
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
71
- run : mvn -B verify -Psonar -Dsonar.projectKey=${{steps.metadata.outputs.sonar-project-key}} sonar:sonar
71
+ run : ./mvnw -B verify -Psonar -Dsonar.projectKey=${{steps.metadata.outputs.sonar-project-key}} sonar:sonar
72
72
73
73
deploy-snapshot :
74
74
needs : sonar-build
75
+ if : github.event_name != 'pull_request'
75
76
runs-on : ubuntu-latest
76
-
77
77
steps :
78
- - uses : actions/checkout@v3
78
+ - uses : actions/checkout@v4
79
79
- name : Set up JDK 17 for snapshot release
80
- uses : actions/setup-java@v3
80
+ uses : actions/setup-java@v4
81
81
with :
82
82
java-version : ' 17'
83
83
distribution : ' temurin'
@@ -90,13 +90,13 @@ jobs:
90
90
91
91
- name : Extract project version
92
92
id : project
93
- run : echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
93
+ run : echo ::set-output name=version::$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
94
94
95
95
- name : Deploy Snapshot with Maven, version ${{ steps.project.outputs.version }}
96
96
if : ${{endsWith(steps.project.outputs.version, '-SNAPSHOT')}}
97
97
run : |
98
- mvn -B -Prelease-snapshot javadoc:aggregate
99
- mvn -B -Prelease-snapshot deploy -Dmaven.test.skip=true
98
+ ./mvnw -B -Prelease-snapshot javadoc:aggregate
99
+ ./mvnw -B -Prelease-snapshot deploy -Dmaven.test.skip=true
100
100
env :
101
101
MAVEN_USERNAME : ${{ secrets.OSS_SONATYPE_USERNAME }}
102
102
MAVEN_CENTRAL_TOKEN : ${{ secrets.OSS_SONATYPE_PASSWORD }}
0 commit comments