4
4
branches :
5
5
- master
6
6
- " 3.0"
7
+ - " 2.14"
7
8
- " 2.13"
8
9
paths-ignore :
9
10
- " README.md"
12
13
branches :
13
14
- master
14
15
- " 3.0"
16
+ - " 2.14"
15
17
- " 2.13"
16
18
paths-ignore :
17
19
- " README.md"
@@ -22,40 +24,40 @@ jobs:
22
24
strategy :
23
25
fail-fast : false
24
26
matrix :
25
- java_version : ['8', '11']
27
+ # JDK 17 has a few failures so cannot yet enable for this module
28
+ java_version : ['8', '11', '17']
26
29
os : ['ubuntu-20.04']
27
30
env :
28
31
JAVA_OPTS : " -XX:+TieredCompilation -XX:TieredStopAtLevel=1"
29
32
steps :
30
- - uses : actions/checkout@v2
33
+ - uses : actions/checkout@v3
31
34
- name : Set up JDK
32
- uses : actions/setup-java@v2
35
+ uses : actions/setup-java@v3
33
36
with :
34
- distribution : " adopt "
37
+ distribution : ' temurin '
35
38
java-version : ${{ matrix.java_version }}
39
+ cache : ' maven'
36
40
server-id : sonatype-nexus-snapshots
37
41
server-username : CI_DEPLOY_USERNAME
38
42
server-password : CI_DEPLOY_PASSWORD
39
43
# See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-Maven
40
44
# gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
41
45
# gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
42
-
43
- with :
44
- path : ~/.m2/repository
45
- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
46
- restore-keys : |
47
- ${{ runner.os }}-maven-
48
46
- name : Build
49
- run : ./mvnw -V -B -ff -ntp verify
47
+ run : ./mvnw -B -q -ff -ntp verify
48
+ - name : Extract project Maven version
49
+ id : projectVersion
50
+ run : echo ::set-output name=version::$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -DforceStdout -Dexpression=project.version -q)
50
51
- name : Deploy snapshot
51
- if : github.event_name != 'pull_request' && matrix.java_version == '8'
52
+ if : github.event_name != 'pull_request' && matrix.java_version == '8' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT')
52
53
env :
53
54
CI_DEPLOY_USERNAME : ${{ secrets.CI_DEPLOY_USERNAME }}
54
55
CI_DEPLOY_PASSWORD : ${{ secrets.CI_DEPLOY_PASSWORD }}
55
- run : ./mvnw -B -ff -DskipTests -ntp source:jar deploy
56
+ # MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
57
+ run : ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy
56
58
- name : Generate code coverage
57
59
if : github.event_name != 'pull_request' && matrix.java_version == '8'
58
- run : ./mvnw -B -ff -ntp test
60
+ run : ./mvnw -B -q - ff -ntp test
59
61
- name : Publish code coverage
60
62
if : github.event_name != 'pull_request' && matrix.java_version == '8'
61
63
uses : codecov/codecov-action@v1
0 commit comments