From c74a6f84156f1e2f7828a8f02cbc63b33eb74bdb Mon Sep 17 00:00:00 2001 From: Gil Tene Date: Thu, 9 Jan 2020 00:45:37 -0800 Subject: [PATCH] Update README and action.yml to describe java-version syntax --- README.md | 30 +++++++++++++++++++++++++++++- action.yml | 4 +++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05b4290..19b41ad 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,39 @@ steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 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 architecture: x64 # (x64 or x86) - defaults to x64 - 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 ```yaml diff --git a/action.yml b/action.yml index 6337613..de7711f 100644 --- a/action.yml +++ b/action.yml @@ -5,7 +5,9 @@ author: 'GitHub' inputs: java-version: 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 java-package: description: 'The package type (jre, jdk, jdk+fx)'