|
1 | | -# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created |
2 | | -# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path |
3 | | - |
4 | 1 | name: maven-release |
5 | 2 |
|
6 | 3 | on: |
7 | 4 | push: |
8 | 5 | branches: |
9 | 6 | - master |
| 7 | + paths-ignore: |
| 8 | + - '*.md' |
| 9 | + - '.gitignore' |
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | build: |
13 | | - |
14 | 13 | runs-on: ubuntu-latest |
15 | | - |
16 | 14 | steps: |
17 | | - - uses: actions/checkout@v2 |
18 | | - - name: Set up JDK 1.11 |
19 | | - uses: actions/setup-java@v1 |
20 | | - with: |
21 | | - java-version: 1.11 |
22 | | - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml |
23 | | - settings-path: ${{ github.workspace }} # location for the settings.xml file |
24 | 15 |
|
25 | | - - name: Publish |
26 | | - uses: samuelmeuli/action-maven-publish@v1 |
27 | | - with: |
28 | | - gpg_private_key: ${{ secrets.gpg_private_key }} |
29 | | - gpg_passphrase: ${{ secrets.gpg_passphrase }} |
30 | | - nexus_username: ${{ secrets.nexus_username }} |
31 | | - nexus_password: ${{ secrets.nexus_password }} |
32 | | - maven_args: '-Pcoverage' |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - uses: actions/setup-java@v3 |
| 19 | + with: |
| 20 | + java-version: 11 |
| 21 | + distribution: corretto |
| 22 | + cache: maven |
| 23 | + server-id: ossrh # Value of distributionManagement.repository.id field of pom.xml |
| 24 | + server-username: MAVEN_USERNAME |
| 25 | + server-password: MAVEN_PASSWORD |
| 26 | + settings-path: ${{ github.workspace }} # Location for settings.xml file |
| 27 | + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} |
| 28 | + gpg-passphrase: GPG_PASSPHRASE |
| 29 | + |
| 30 | + - name: Publish with Maven deploy |
| 31 | + run: > |
| 32 | + mvn |
| 33 | + --batch-mode |
| 34 | + --activate-profiles deploy |
| 35 | + -Pcoverage |
| 36 | + clean deploy |
| 37 | + env: |
| 38 | + MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} |
| 39 | + MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} |
| 40 | + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
33 | 41 |
|
34 | | - - name: Upload coverage to Codecov |
35 | | - uses: codecov/codecov-action@v2 |
36 | | - with: |
37 | | - token: ${{ secrets.CODECOV_TOKEN }} |
38 | | -# - name: Release |
39 | | -# uses: softprops/action-gh-release@v1 |
40 | | -# if: startsWith(github.ref, 'refs/tags/') |
41 | | -# env: |
42 | | -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 42 | + - name: Upload coverage to Codecov |
| 43 | + uses: codecov/codecov-action@v2 |
| 44 | + with: |
| 45 | + token: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments