mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
fix e2e tests
This commit is contained in:
parent
b091e7652f
commit
242eb73434
2 changed files with 15 additions and 3 deletions
12
README.md
12
README.md
|
@ -20,6 +20,7 @@ This action provides the following functionality for GitHub Actions runners:
|
|||
Inputs `java-version` and `distribution` are mandatory. See [Supported distributions](../README.md#Supported-distributions) section for a list of available options.
|
||||
|
||||
### Basic
|
||||
**Adopt OpenJDK**
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -30,6 +31,17 @@ steps:
|
|||
- run: java -cp java HelloWorldApp
|
||||
```
|
||||
|
||||
**Zulu OpenJDK**
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v2-preview
|
||||
with:
|
||||
distribution: 'zulu' # See 'Supported distributions' for available options
|
||||
java-version: '11'
|
||||
- run: java -cp java HelloWorldApp
|
||||
```
|
||||
|
||||
#### Supported version syntax
|
||||
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
|
||||
- major versions: `8`, `11`, `15`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue