Skip to content

Commit dd06d9c

Browse files
authored
Prepare documentation for v6 release (#1253)
Update public examples and release messaging to make v6 the recommended stable version, include late-cycle v6 features, and increase the JetBrains test timeout to avoid cold-run flakes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 24e3d384-3bda-4ca3-b1fc-f49e340c174f
1 parent 59b3450 commit dd06d9c

3 files changed

Lines changed: 23 additions & 38 deletions

File tree

‎README.md‎

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,13 @@ Set up Java for GitHub Actions workflows. `setup-java` installs a requested Java
99
```yaml
1010
steps:
1111
- uses: actions/checkout@v7
12-
- uses: actions/setup-java@v5
12+
- uses: actions/setup-java@v6
1313
with:
1414
distribution: temurin
1515
java-version: '25'
1616
- run: java --version
1717
```
1818
19-
> [!NOTE]
20-
> V6 is still in development on the `main` branch and is not yet recommended for production workflows. To use it, you must explicitly reference the `main` branch in your workflow, as in
21-
>
22-
> ```yaml
23-
> - uses: actions/setup-java@main
24-
> ```
25-
>
26-
> For production workflows, it is recommended to use the latest stable release `v5`.
27-
2819
## Contents
2920
3021
- [What it does](#what-it-does)
@@ -54,15 +45,16 @@ steps:
5445

5546
## What's new
5647

57-
### V6 (in development)
48+
### V6
5849

5950
- Migrated the action implementation to ESM to support the latest `@actions/*` packages.
60-
- Added the `oracle-openjdk` distribution for OpenJDK builds from Oracle.
51+
- Added the `oracle-openjdk`, `redhat`, and `liberica-nik` distributions.
6152
- Added `java-version: latest` to resolve the newest stable GA release from the distribution's remote metadata.
62-
- JDK downloads now automatically verify authoritative checksums for [supported distributions](#download-integrity-and-signatures).
53+
- JDK downloads now automatically verify authoritative checksums, and package signature verification defaults to enabled for Temurin and Microsoft builds.
6354
- Added `force-download: true` to bypass the tool cache and perform a reproducible fresh install.
6455
- Dependency caching now supports custom paths with `cache-path` and restore-only operation with `cache-read-only: true`.
6556
- Downloaded JDKs are now [cached](#caching-jdk-installations) automatically when `cache` is set; use `cache-jdk` to enable or disable it independently.
57+
- Maven configuration now supports multiple server credentials and custom dependency-resolution repositories.
6658
- Set `problem-matcher: false` to disable Java compiler and uncaught-exception annotations.
6759
- GraalVM distributions now set `GRAALVM_HOME` in addition to `JAVA_HOME`.
6860
- Invalid boolean values, unsupported distribution/package/platform combinations, and mismatched Maven toolchain ID counts now fail with targeted errors.
@@ -89,7 +81,7 @@ steps:
8981
### Older versions
9082

9183
> [!WARNING]
92-
> `actions/setup-java` versions `v1` through `v4` are deprecated. Upgrade workflows to `actions/setup-java@v5`, the latest stable release.
84+
> `actions/setup-java` versions `v1` through `v4` are deprecated. Upgrade workflows to `actions/setup-java@v6`, the latest stable release.
9385

9486
## Usage
9587

@@ -98,7 +90,7 @@ steps:
9890
```yaml
9991
steps:
10092
- uses: actions/checkout@v7
101-
- uses: actions/setup-java@v5
93+
- uses: actions/setup-java@v6
10294
with:
10395
distribution: temurin
10496
java-version: '25'
@@ -110,7 +102,7 @@ steps:
110102
```yaml
111103
steps:
112104
- uses: actions/checkout@v7
113-
- uses: actions/setup-java@v5
105+
- uses: actions/setup-java@v6
114106
with:
115107
distribution: microsoft
116108
java-version: '25'
@@ -122,7 +114,7 @@ steps:
122114
```yaml
123115
steps:
124116
- uses: actions/checkout@v7
125-
- uses: actions/setup-java@v5
117+
- uses: actions/setup-java@v6
126118
with:
127119
distribution: temurin
128120
java-version-file: .java-version
@@ -136,7 +128,7 @@ Supported version files are `.java-version`, `.tool-versions`, and `.sdkmanrc`.
136128
```yaml
137129
steps:
138130
- uses: actions/checkout@v7
139-
- uses: actions/setup-java@v5
131+
- uses: actions/setup-java@v6
140132
with:
141133
distribution: temurin
142134
java-version: latest
@@ -267,7 +259,7 @@ Set `cache` to `maven`, `gradle`, or `sbt` to cache dependencies with minimal co
267259
```yaml
268260
steps:
269261
- uses: actions/checkout@v7
270-
- uses: actions/setup-java@v5
262+
- uses: actions/setup-java@v6
271263
with:
272264
distribution: temurin
273265
java-version: '25'
@@ -286,7 +278,7 @@ The primary dependency cache key is `setup-java-<runner-os>-<node-arch>-<package
286278
Use `cache-dependency-path` to override the files used for key hashing, especially in monorepos:
287279

288280
```yaml
289-
- uses: actions/setup-java@v5
281+
- uses: actions/setup-java@v6
290282
with:
291283
distribution: temurin
292284
java-version: '25'
@@ -299,7 +291,7 @@ Use `cache-dependency-path` to override the files used for key hashing, especial
299291
Use `cache-path` when the build tool stores dependencies outside the default location:
300292

301293
```yaml
302-
- uses: actions/setup-java@v5
294+
- uses: actions/setup-java@v6
303295
with:
304296
distribution: temurin
305297
java-version: '25'
@@ -338,7 +330,7 @@ The JDK cache stores the downloaded JDK installation so later runs skip the down
338330
Set `cache-read-only: true` to restore dependency, wrapper, and JDK caches without saving changes in the post action. This is useful for pull requests, merge queues, short-lived branches, and matrix fan-out jobs that should only consume caches produced elsewhere.
339331

340332
```yaml
341-
- uses: actions/setup-java@v5
333+
- uses: actions/setup-java@v6
342334
with:
343335
distribution: temurin
344336
java-version: '25'
@@ -354,7 +346,7 @@ jobs:
354346
runs-on: ubuntu-latest
355347
steps:
356348
- uses: actions/checkout@v7
357-
- uses: actions/setup-java@v5
349+
- uses: actions/setup-java@v6
358350
with:
359351
distribution: temurin
360352
java-version: '25'
@@ -369,7 +361,7 @@ jobs:
369361
goal: [test, verify, package]
370362
steps:
371363
- uses: actions/checkout@v7
372-
- uses: actions/setup-java@v5
364+
- uses: actions/setup-java@v6
373365
with:
374366
distribution: temurin
375367
java-version: '25'
@@ -387,7 +379,7 @@ env:
387379
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
388380
steps:
389381
- uses: actions/checkout@v7
390-
- uses: actions/setup-java@v5
382+
- uses: actions/setup-java@v6
391383
with:
392384
distribution: temurin
393385
java-version: '25'
@@ -401,7 +393,7 @@ Install multiple Java versions by providing a multiline `java-version` value. Al
401393

402394
```yaml
403395
steps:
404-
- uses: actions/setup-java@v5
396+
- uses: actions/setup-java@v6
405397
with:
406398
distribution: temurin
407399
java-version: |
@@ -428,7 +420,7 @@ jobs:
428420
name: Java ${{ matrix.java }}
429421
steps:
430422
- uses: actions/checkout@v7
431-
- uses: actions/setup-java@v5
423+
- uses: actions/setup-java@v6
432424
with:
433425
distribution: temurin
434426
java-version: ${{ matrix.java }}
@@ -445,7 +437,7 @@ jobs:
445437
```yaml
446438
steps:
447439
- uses: actions/checkout@v7
448-
- uses: actions/setup-java@v5
440+
- uses: actions/setup-java@v6
449441
with:
450442
distribution: temurin
451443
java-version: '25'
@@ -467,7 +459,7 @@ required. See [Resolving Maven dependencies from custom repositories](docs/advan
467459
```yaml
468460
steps:
469461
- uses: actions/checkout@v7
470-
- uses: actions/setup-java@v5
462+
- uses: actions/setup-java@v6
471463
with:
472464
distribution: temurin
473465
java-version: '25'

‎__tests__/distributors/jetbrains-installer.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ function response(
7878
}
7979

8080
describe('getAvailableVersions', () => {
81+
jest.setTimeout(10_000);
82+
8183
let spyHttpClient: any;
8284
let spyCoreError: any;
8385
const originalGitHubToken = process.env.GITHUB_TOKEN;

‎docs/advanced-usage.md‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@
3939

4040
See [action.yml](../action.yml) for more details on task inputs.
4141

42-
> [!NOTE]
43-
> The examples on this page reference `actions/setup-java@v6`, which is still in
44-
> development on the `main` branch and is not yet published as a release tag. To
45-
> try the V6 features documented here (`cache-jdk`, `force-download`,
46-
> `problem-matcher`, `cache-path`, `cache-read-only`, `java-version: latest`,
47-
> `oracle-openjdk`, and the `*-env-var` input names), reference
48-
> `actions/setup-java@main`. For production workflows use the latest stable
49-
> release, `actions/setup-java@v5`, as shown in the [README](../README.md).
50-
5142
## Selecting a Java distribution
5243
`java-version` and `distribution` select what gets installed. `java-version` may be replaced by `java-version-file`, and `distribution` is optional only when `java-version-file` points to a `.sdkmanrc` or `.tool-versions` file that carries a recognized vendor identifier. In every other case both inputs must be provided. See [Supported distributions](../README.md#Supported-distributions) for a list of available options.
5344

0 commit comments

Comments
 (0)