Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup-java action to v4 #1241

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 13 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,34 @@ permissions:

jobs:
build:
name: "Test with ${{ matrix.version }}"
name: Test with JDK ${{ matrix.version }}
strategy:
matrix:
version: [ 17.0.1-tem, 21-tem ]
version: [ 17.0.12, 21.0.4 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Download ${{ matrix.version }}
uses: sdkman/sdkman-action@master
id: sdkman
with:
candidate: java
version: ${{ matrix.version }}
- name: Set up ${{ matrix.version }}
uses: actions/setup-java@v1
- name: Set up JDK ${{ matrix.version }}
uses: actions/setup-java@v4
with:
java-version: 8
jdkFile: ${{ steps.sdkman.outputs.file }}
distribution: temurin
java-version: ${{ matrix.version }}
cache: maven
- name: Build with Maven
run: ./mvnw -V -B verify -Pspring
sonar:
name: "Run Sonar Analysis"
name: Run Sonar Analysis
runs-on: ubuntu-latest
# Disable Sonar for foreign PRs
if: (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))
steps:
- uses: actions/checkout@v4
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Download JDK
uses: sdkman/sdkman-action@master
id: sdkman
with:
candidate: java
version: 17.0.1-tem
- name: Set up JDK
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 8
jdkFile: ${{ steps.sdkman.outputs.file }}
distribution: temurin
java-version: 17.0.12
cache: maven
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
Expand Down
25 changes: 7 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,19 @@ permissions:

jobs:
build:
name: "Release"
name: Release
strategy:
matrix:
version: [ 17.0.1-tem ]
version: [ 17.0.12 ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Cache local Maven repository
uses: actions/cache@v4
- name: Set up JDK ${{ matrix.version }}
uses: actions/setup-java@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Download ${{ matrix.version }}
uses: sdkman/sdkman-action@master
id: sdkman
with:
candidate: java
version: ${{ matrix.version }}
- name: Set up ${{ matrix.version }}
uses: actions/setup-java@v1
with:
java-version: 8
jdkFile: ${{ steps.sdkman.outputs.file }}
distribution: temurin
java-version: ${{ matrix.version }}
cache: maven
server-id: ossrh-awspring
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/upload-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: sdkman/sdkman-action@master
id: sdkman
uses: actions/setup-java@v4
with:
candidate: java
version: '17.0.1-tem'
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
jdkFile: ${{ steps.sdkman.outputs.file }}
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
distribution: temurin
java-version: 17.0.12
cache: maven
- name: Build docs
run: ./mvnw clean package javadoc:aggregate -Pdocs-classic,spring -DskipTests=true -e
- name: Upload to S3
Expand Down