|
9 | 9 |
|
10 | 10 | jobs: |
11 | 11 | build: |
12 | | - |
13 | 12 | runs-on: ubuntu-latest |
14 | 13 | permissions: |
15 | 14 | contents: read |
16 | 15 | packages: write |
17 | | - strategy: |
18 | | - matrix: |
19 | | - distribution: [ 'zulu' ] #, 'temurin' ] |
20 | | - java: [ '8' ] #, '11' ] |
21 | | - os: [ 'ubuntu-latest' ] #, 'macos-latest', 'windows-latest' ] |
22 | | - name: Java ${{ matrix.distribution }} ${{ matrix.Java }} (${{ matrix.os }}) publish |
| 16 | + name: Java 8 (Zulu) publish |
23 | 17 |
|
24 | 18 | steps: |
| 19 | + - name: Checkout Code |
25 | 20 | - uses: actions/checkout@v2 |
26 | 21 |
|
27 | | -# - name: Import GPG Key |
28 | | -# id: import_gpg |
29 | | -# uses: crazy-max/ghaction-import-gpg@v4 |
30 | | -# with: |
31 | | -# gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} |
32 | | -# passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |
33 | | - |
34 | | - - name: Set up JDK |
35 | | - uses: actions/setup-java@v2 |
36 | | - with: |
37 | | - java-version: ${{ matrix.Java }} |
38 | | - distribution: ${{ matrix.distribution }} |
39 | | - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml |
40 | | - server-username: MAVEN_USERNAME # env variable for username in deploy |
41 | | - server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy |
42 | | - gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import |
43 | | - gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase |
44 | | - |
45 | | - - name: Build with Maven |
46 | | - run: mvn -B package --file pom.xml |
47 | | - |
48 | | - - name: Publish to GitHub Packages Apache Maven |
49 | | - run: mvn deploy |
50 | | - env: |
51 | | - GITHUB_TOKEN: ${{ github.token }} |
52 | | - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |
53 | | - |
54 | 22 | - name: Set up Apache Maven Central |
55 | 23 | uses: actions/setup-java@v2 |
56 | 24 | with: # running setup-java again overwrites the settings.xml |
|
62 | 30 | gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import |
63 | 31 | gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase |
64 | 32 |
|
| 33 | + - name: Build with Maven |
| 34 | + run: mvn -B package --file pom.xml |
| 35 | + |
65 | 36 | - name: Publish to Apache Maven Central |
66 | 37 | run: mvn deploy |
67 | 38 | env: |
|
0 commit comments