5
5
- master
6
6
- " 3.0"
7
7
- " 2.14"
8
- - " 2.13"
9
8
paths-ignore :
10
9
- " README.md"
11
10
- " release-notes/*"
14
13
- master
15
14
- " 3.0"
16
15
- " 2.14"
17
- - " 2.13"
18
16
paths-ignore :
19
17
- " README.md"
20
18
- " release-notes/*"
@@ -39,12 +37,28 @@ jobs:
39
37
server-id : sonatype-nexus-snapshots
40
38
server-username : CI_DEPLOY_USERNAME
41
39
server-password : CI_DEPLOY_PASSWORD
40
+ # See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-Maven
41
+ # gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
42
+ # gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
42
43
- name : Build
43
- run : ./mvnw -V -B -ff -ntp verify
44
+ run : ./mvnw -B -q -ff -ntp verify
45
+ - name : Extract project Maven version
46
+ id : projectVersion
47
+ run : echo ::set-output name=version::$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -DforceStdout -Dexpression=project.version -q)
44
48
- name : Deploy snapshot
45
- if : github.event_name != 'pull_request' && matrix.java_version == '8'
49
+ if : github.event_name != 'pull_request' && matrix.java_version == '8' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT')
46
50
env :
47
51
CI_DEPLOY_USERNAME : ${{ secrets.CI_DEPLOY_USERNAME }}
48
52
CI_DEPLOY_PASSWORD : ${{ secrets.CI_DEPLOY_PASSWORD }}
49
53
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
50
- run : ./mvnw -V -B -ff -DskipTests -ntp source:jar deploy
54
+ run : ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy
55
+ - name : Generate code coverage
56
+ if : github.event_name != 'pull_request' && matrix.java_version == '8'
57
+ run : ./mvnw -B -q -ff -ntp test
58
+ - name : Publish code coverage
59
+ if : github.event_name != 'pull_request' && matrix.java_version == '8'
60
+ uses : codecov/codecov-action@v1
61
+ with :
62
+ token : ${{ secrets.CODECOV_TOKEN }}
63
+ file : ./target/site/jacoco/jacoco.xml
64
+ flags : unittests
0 commit comments