Skip to content

Commit 90217b2

Browse files
aepflichrfwow
andauthored
chore: update build and tooling to utilize new java version (#1321)
* chore: update build and tooling to utilize new java version Signed-off-by: Simon Schrottner <[email protected]> * Fix failing test Signed-off-by: christian.lutnik <[email protected]> * chore: update build and tooling to utilize new java version Signed-off-by: Simon Schrottner <[email protected]> --------- Signed-off-by: Simon Schrottner <[email protected]> Signed-off-by: christian.lutnik <[email protected]> Co-authored-by: christian.lutnik <[email protected]>
1 parent 88baa65 commit 90217b2

File tree

4 files changed

+377
-235
lines changed

4 files changed

+377
-235
lines changed

.github/workflows/merge.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ permissions:
1616

1717
jobs:
1818
build:
19-
2019
runs-on: ubuntu-latest
2120

2221
steps:
2322
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
24-
- name: Set up JDK 8
23+
- name: Set up JDK 17
2524
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
2625
with:
27-
java-version: '8'
26+
java-version: '17'
2827
distribution: 'temurin'
2928
cache: maven
3029
server-id: ossrh
@@ -35,9 +34,9 @@ jobs:
3534
uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11
3635
with:
3736
path: ~/.m2/repository
38-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
37+
key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }}
3938
restore-keys: |
40-
${{ runner.os }}-maven-
39+
${{ runner.os }}-17-maven-
4140
4241
- name: Configure GPG Key
4342
run: |
@@ -60,7 +59,7 @@ jobs:
6059
# Add -SNAPSHOT before deploy
6160
- name: Add SNAPSHOT
6261
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT'
63-
62+
6463
- name: Deploy
6564
run: |
6665
mvn --batch-mode \

.github/workflows/pullrequest.yml

+20-10
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ permissions:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest]
13+
build:
14+
- java: 17
15+
profile: codequality
16+
- java: 8
17+
profile: java8
18+
name: with Java ${{ matrix.build.java }}
19+
runs-on: ${{ matrix.os}}
1120
steps:
1221
- name: Check out the code
1322
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
1423

1524
- name: Set up JDK 8
1625
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
1726
with:
18-
java-version: '8'
19-
distribution: 'temurin'
20-
cache: maven
27+
java-version: ${{ matrix.build.java }}
28+
distribution: 'temurin'
29+
cache: maven
2130

2231
- name: Initialize CodeQL
2332
uses: github/codeql-action/init@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8
@@ -27,15 +36,16 @@ jobs:
2736
- name: Cache local Maven repository
2837
uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11
2938
with:
30-
path: ~/.m2/repository
31-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
32-
restore-keys: |
33-
${{ runner.os }}-maven-
39+
path: ~/.m2/repository
40+
key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }}
41+
restore-keys: |
42+
${{ runner.os }}${{ matrix.build.java }}-maven-
3443
3544
- name: Verify with Maven
36-
run: mvn --batch-mode --update-snapshots --activate-profiles e2e verify
45+
run: mvn --batch-mode --update-snapshots --activate-profiles e2e,${{ matrix.build.profile }} verify
3746

38-
- name: Upload coverage to Codecov
47+
- if: matrix.build.java == '17'
48+
name: Upload coverage to Codecov
3949
uses: codecov/[email protected]
4050
with:
4151
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ jobs:
2323
id: release
2424
with:
2525
token: ${{secrets.GITHUB_TOKEN}}
26-
default-branch: main
26+
target-branch: main
2727

2828
# These steps are only run if this was a merged release-please PR
2929
- name: checkout
3030
if: ${{ steps.release.outputs.release_created }}
3131
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
32-
- name: Set up JDK 8
32+
- name: Set up JDK 17
3333
if: ${{ steps.release.outputs.release_created }}
3434
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
3535
with:
36-
java-version: '8'
36+
java-version: '17'
3737
distribution: 'temurin'
3838
cache: maven
3939
server-id: ossrh
@@ -54,4 +54,4 @@ jobs:
5454
--settings release/m2-settings.xml clean deploy
5555
env:
5656
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
57-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
57+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

0 commit comments

Comments
 (0)