|
1 | 1 | name: Build |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - - develop |
8 | | - pull_request: |
9 | | - merge_group: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - develop |
| 8 | + pull_request: |
| 9 | + merge_group: |
10 | 10 |
|
11 | 11 | permissions: |
12 | | - id-token: write # This is required for requesting the JWT |
13 | | - security-events: write |
14 | | - contents: read |
15 | | - actions: read # This is required for actions/checkout |
16 | | - issues: write |
17 | | - pull-requests: write |
18 | | - checks: write # needed for spotbugs |
| 12 | + id-token: write # This is required for requesting the JWT |
| 13 | + security-events: write |
| 14 | + contents: read |
| 15 | + actions: read # This is required for actions/checkout |
| 16 | + issues: write |
| 17 | + pull-requests: write |
| 18 | + checks: write # needed for spotbugs |
19 | 19 |
|
20 | 20 | jobs: |
21 | | - build: |
22 | | - strategy: |
23 | | - matrix: |
24 | | - os: [ ubuntu-latest,windows-latest ] |
25 | | - java: [ 11, 17 ] |
26 | | - fail-fast: false |
| 21 | + build: |
| 22 | + strategy: |
| 23 | + matrix: |
| 24 | + os: [ubuntu-latest, windows-latest] |
| 25 | + java: [11, 17] |
| 26 | + fail-fast: false |
27 | 27 |
|
28 | | - runs-on: ${{ matrix.os }} |
| 28 | + runs-on: ${{ matrix.os }} |
29 | 29 |
|
30 | | - steps: |
31 | | - - name: Checkout |
32 | | - uses: actions/checkout@v3 |
| 30 | + steps: |
| 31 | + - name: Checkout |
| 32 | + uses: actions/checkout@v3 |
33 | 33 |
|
34 | | - - name: Set up cache for ~./m2/repository |
35 | | - uses: actions/cache@v3 |
36 | | - with: |
37 | | - path: ~/.m2/repository |
38 | | - key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} |
39 | | - restore-keys: | |
40 | | - maven-${{ matrix.os }}-java${{ matrix.java }}- |
41 | | - maven-${{ matrix.os }}- |
| 34 | + - name: Set up cache for ~./m2/repository |
| 35 | + uses: actions/cache@v3 |
| 36 | + with: |
| 37 | + path: ~/.m2/repository |
| 38 | + key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} |
| 39 | + restore-keys: | |
| 40 | + maven-${{ matrix.os }}-java${{ matrix.java }}- |
| 41 | + maven-${{ matrix.os }}- |
42 | 42 |
|
43 | | - - name: Set up JDK |
44 | | - uses: actions/setup-java@v3 |
45 | | - with: |
46 | | - java-version: ${{ matrix.java }} |
47 | | - distribution: 'adopt' |
| 43 | + - name: Set up JDK |
| 44 | + uses: actions/setup-java@v3 |
| 45 | + with: |
| 46 | + java-version: ${{ matrix.java }} |
| 47 | + distribution: "adopt" |
48 | 48 |
|
49 | | - - name: Build with Maven |
50 | | - run: ./mvnw --batch-mode clean install |
| 49 | + - name: Build with Maven |
| 50 | + run: ./mvnw --batch-mode clean install |
51 | 51 |
|
52 | | - deploy: |
53 | | - needs: [ build ] |
54 | | - runs-on: ubuntu-latest |
| 52 | + - name: Run PMD checks |
| 53 | + run: ./mvnw pmd:check |
55 | 54 |
|
56 | | - steps: |
57 | | - - name: Check out |
58 | | - uses: actions/checkout@v3 |
59 | | - with: |
60 | | - fetch-depth: 0 |
61 | | - - name: Set up JDK 11 |
62 | | - uses: actions/setup-java@v3 |
63 | | - with: |
64 | | - distribution: 'adopt' |
65 | | - java-version: 11 |
| 55 | + deploy: |
| 56 | + needs: [build] |
| 57 | + runs-on: ubuntu-latest |
| 58 | + |
| 59 | + steps: |
| 60 | + - name: Check out |
| 61 | + uses: actions/checkout@v3 |
| 62 | + with: |
| 63 | + fetch-depth: 0 |
| 64 | + - name: Set up JDK 11 |
| 65 | + uses: actions/setup-java@v3 |
| 66 | + with: |
| 67 | + distribution: "adopt" |
| 68 | + java-version: 11 |
0 commit comments