mirror of
https://github.com/actions/setup-java
synced 2024-12-22 21:22:41 +00:00
Update README and action.yml to describe java-version syntax
This commit is contained in:
parent
b52cd69bd2
commit
c74a6f8415
2 changed files with 32 additions and 2 deletions
30
README.md
30
README.md
|
@ -19,11 +19,39 @@ steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-java@v1
|
- uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: '9.0.4' # The JDK version to make available on the path. Takes a whole or semver JDK version, or 1.x syntax (e.g. 1.8 => Jdk 8.x). To specify a specific version for JDK 8 or older use the following pattern (8.0.x)
|
java-version: '9.0.4' # The JDK version to make available on the path.
|
||||||
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
|
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
|
||||||
architecture: x64 # (x64 or x86) - defaults to x64
|
architecture: x64 # (x64 or x86) - defaults to x64
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java -cp java HelloWorldApp
|
||||||
```
|
```
|
||||||
|
Examples of version specifications that the java-version parameter will accept:
|
||||||
|
|
||||||
|
- A major java version
|
||||||
|
|
||||||
|
e.g. ```6, 7, 8, 9, 10, 11, 12, 13, ...```
|
||||||
|
|
||||||
|
- A semver Java version specification
|
||||||
|
|
||||||
|
e.g. ```8.0.232, 7.0.181, 11.0.4```
|
||||||
|
|
||||||
|
e.g. ```8.0.x, >11.0.3, >=13.0.1, <8.0.212```
|
||||||
|
|
||||||
|
- An early access (EA) Java version
|
||||||
|
|
||||||
|
e.g. ```14-ea, 15-ea```
|
||||||
|
|
||||||
|
e.g. ```14.0.0-ea, 15.0.0-ea```
|
||||||
|
|
||||||
|
e.g. ```14.0.0-ea.28, 15.0.0-ea.2``` (syntax for specifying an EA build number)
|
||||||
|
|
||||||
|
Note that, per semver rules, EA builds will be matched by explicit EA version specifications.
|
||||||
|
|
||||||
|
- 1.x syntax
|
||||||
|
|
||||||
|
e.g. ```1.8``` (same as ```8```)
|
||||||
|
|
||||||
|
e.g. ```1.8.0.212``` (same as ```8.0.212```)
|
||||||
|
|
||||||
|
|
||||||
## Local file
|
## Local file
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
@ -5,7 +5,9 @@ author: 'GitHub'
|
||||||
inputs:
|
inputs:
|
||||||
java-version:
|
java-version:
|
||||||
description: 'The Java version to make available on the path. Takes a whole
|
description: 'The Java version to make available on the path. Takes a whole
|
||||||
or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x)'
|
or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x).
|
||||||
|
Early access versions can be specified in the form of e.g. 14-ea,
|
||||||
|
14.0.0-ea, or 14.0.0-ea.28'
|
||||||
required: true
|
required: true
|
||||||
java-package:
|
java-package:
|
||||||
description: 'The package type (jre, jdk, jdk+fx)'
|
description: 'The package type (jre, jdk, jdk+fx)'
|
||||||
|
|
Loading…
Reference in a new issue