Skip to content

Commit 6dc4d4a

Browse files
authored
Merge pull request actions#41 from foo-actions/master
Update REAME and action.yml to describe java-version syntax options
2 parents 5ef3a8d + f6b96ad commit 6dc4d4a

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,39 @@ steps:
1919
- uses: actions/checkout@v2
2020
- uses: actions/setup-java@v1
2121
with:
22-
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)
22+
java-version: '9.0.4' # The JDK version to make available on the path.
2323
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
2424
architecture: x64 # (x64 or x86) - defaults to x64
2525
- run: java -cp java HelloWorldApp
2626
```
27+
Examples of version specifications that the java-version parameter will accept:
28+
29+
- A major Java version
30+
31+
e.g. ```6, 7, 8, 9, 10, 11, 12, 13, ...```
32+
33+
- A semver Java version specification
34+
35+
e.g. ```8.0.232, 7.0.181, 11.0.4```
36+
37+
e.g. ```8.0.x, >11.0.3, >=13.0.1, <8.0.212```
38+
39+
- An early access (EA) Java version
40+
41+
e.g. ```14-ea, 15-ea```
42+
43+
e.g. ```14.0.0-ea, 15.0.0-ea```
44+
45+
e.g. ```14.0.0-ea.28, 15.0.0-ea.2``` (syntax for specifying an EA build number)
46+
47+
Note that, per semver rules, EA builds will be matched by explicit EA version specifications.
48+
49+
- 1.x syntax
50+
51+
e.g. ```1.8``` (same as ```8```)
52+
53+
e.g. ```1.8.0.212``` (same as ```8.0.212```)
54+
2755

2856
## Local file
2957
```yaml

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ author: 'GitHub'
55
inputs:
66
java-version:
77
description: 'The Java version to make available on the path. Takes a whole
8-
or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x)'
8+
or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x).
9+
Early access versions can be specified in the form of e.g. 14-ea,
10+
14.0.0-ea, or 14.0.0-ea.28'
911
required: true
1012
java-package:
1113
description: 'The package type (jre, jdk, jdk+fx)'

0 commit comments

Comments
 (0)