Add support for multiple jdks (#368)

This commit is contained in:
Dmitry Shibanov
2022-09-08 15:26:54 +02:00
committed by GitHub
parent 749e4491fa
commit d854b6da19
15 changed files with 4219 additions and 3569 deletions

View File

@@ -158,25 +158,18 @@ jobs:
```
### Install multiple JDKs
All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'.
```yaml
steps:
- uses: actions/setup-java@v3
with:
distribution: '<distribution>'
java-version: 8
- run: echo "JAVA_8=$JAVA_HOME" >> $GITHUB_ENV
- uses: actions/setup-java@v3
with:
distribution: '<distribution>'
java-version: 11
- run: echo "JAVA_11=$JAVA_HOME" >> $GITHUB_ENV
- uses: actions/setup-java@v3
with:
distribution: '<distribution>'
java-version: 15
- run: echo "JAVA_15=$JAVA_HOME" >> $GITHUB_ENV
java-version: |
8
11
15
```
### Advanced