You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 211508c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,13 +25,6 @@ This action allows you to work with Java and Scala projects.
25
25
26
26
For more details, see the full release notes on the [releases page](https://github.com/actions/setup-java/releases/tag/v5.0.0)
27
27
28
-
## V2 vs V1
29
-
30
-
- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK.
31
-
- V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2.
32
-
33
-
For information about the latest releases, recent updates, and newly supported distributions, please refer to the `setup-java`[Releases](https://github.com/actions/setup-java/releases).
34
-
35
28
## Usage
36
29
37
30
-`java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified.
@@ -98,8 +91,8 @@ steps:
98
91
```
99
92
100
93
#### Supported version syntax
101
-
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
102
-
- major versions: `8`, `11`, `16`, `17`, `21`, `25`
94
+
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation. The values below are examples, not an exhaustive list:
95
+
- major versions, such as: `8`, `11`, `16`, `17`, `21`, `25`
103
96
- more specific versions: `8.0.282+8`, `8.0.232`, `11.0`, `11.0.4`, `17.0`
104
97
- early access (EA) versions: `15-ea`, `15.0.0-ea`
105
98
@@ -292,6 +285,15 @@ In the example above multiple JDKs are installed for the same job. The result af
- [Java Version File](docs/advanced-usage.md#Java-version-file)
294
287
288
+
## V2 vs V1
289
+
290
+
Examples in this README use `actions/setup-java@v5`, but the main migration note from V1 still applies to all later major versions (`v2`, `v3`, `v4`, and `v5`):
291
+
292
+
- Starting with V2, the action supports custom distributions. V1 supports only Azul Zulu OpenJDK.
293
+
- Starting with V2, you must specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, so only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2.
294
+
295
+
For information about the latest releases, recent updates, and newly supported distributions, please refer to the `setup-java` [Releases](https://github.com/actions/setup-java/releases).
296
+
295
297
## Recommended permissions
296
298
297
299
When using the `setup-java` action in your GitHub Actions workflow, it is recommended to set the following permissions to ensure proper functionality:
0 commit comments