The AdoptOpenJDK has been discontinued since July 2021. When using Zulu you get all the latest updated (TCK Tested) builds for all versions of OpenJDK.
Also added are fixed (major) release version(s) such as 11.0.3. This is often a good practice whenever a build/test triggers (push/pull events) this can determine if the latest JDK (11) had failed the build vs something in your code that caused it. For example, when building with JDK 11.0.3 (fixed version) the build passes (green) and JDK 11 fails (red) will mean that the latest JDK (11) was the cause and not your code.
Note: Other distributions such as Temurin do not support archived fixed release prior to Sept. 2021.
build:
runs-on: ubuntu-latest
-
+ strategy:
+ matrix:
+ os: [ ubuntu-latest ]
+ java-version: [ 11.0.3, 11 ]
steps:
- uses: actions/checkout@v2
- - name: Set up JDK 11
+ - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
- java-version: '11'
- distribution: 'adopt'
+ java-version: ${{ matrix.java-version }}
+ distribution: 'zulu'
- name: Build with Maven
run: mvn -B package --file pom.xml