|
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"
|
| 11 | + - "release-notes/*" |
10 | 12 | jobs:
|
11 | 13 | build:
|
12 | 14 | runs-on: ${{ matrix.os }}
|
13 | 15 | strategy:
|
14 | 16 | fail-fast: false
|
15 | 17 | matrix:
|
16 |
| - java_version: ['8', '14'] |
| 18 | + java_version: ['8', '11', '17'] |
17 | 19 | os: ['ubuntu-20.04']
|
18 | 20 | env:
|
19 | 21 | JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
|
20 | 22 | steps:
|
21 |
| - - uses: actions/checkout@v2 |
| 23 | + - uses: actions/checkout@v3 |
22 | 24 | - name: Set up JDK
|
23 |
| - uses: actions/setup-java@v2 |
| 25 | + uses: actions/setup-java@v3 |
24 | 26 | with:
|
25 |
| - distribution: "adopt" |
| 27 | + distribution: 'temurin' |
26 | 28 | java-version: ${{ matrix.java_version }}
|
| 29 | + cache: 'maven' |
27 | 30 | server-id: sonatype-nexus-snapshots
|
28 | 31 | server-username: CI_DEPLOY_USERNAME
|
29 | 32 | server-password: CI_DEPLOY_PASSWORD
|
30 |
| - |
31 |
| - with: |
32 |
| - path: ~/.m2/repository |
33 |
| - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
34 |
| - restore-keys: | |
35 |
| - ${{ runner.os }}-maven- |
| 33 | + # See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-Maven |
| 34 | + # gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import |
| 35 | + # gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase |
36 | 36 | - name: Build
|
37 |
| - run: ./mvnw -V -B -ff -ntp verify |
| 37 | + run: ./mvnw -B -q -ff -ntp verify |
| 38 | + - name: Extract project Maven version |
| 39 | + id: projectVersion |
| 40 | + run: echo ::set-output name=version::$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -DforceStdout -Dexpression=project.version -q) |
38 | 41 | - name: Deploy snapshot
|
39 |
| - if: github.event_name != 'pull_request' && matrix.java_version == '8' |
| 42 | + if: github.event_name != 'pull_request' && matrix.java_version == '8' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT') |
40 | 43 | env:
|
41 | 44 | CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
|
42 | 45 | CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
|
43 | 46 | # MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
44 |
| - run: ./mvnw -V -B -ff -DskipTests -ntp source:jar deploy |
| 47 | + run: ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy |
0 commit comments