From dd06d9cba3e5552c54d9f8ea23572deb30010f7c Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Mon, 24 Aug 2026 11:49:23 -0400 Subject: [PATCH] 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 <223556219+Copilot@users.noreply.github.com> Copilot-Session: 24e3d384-3bda-4ca3-b1fc-f49e340c174f --- README.md | 50 ++++++++----------- .../distributors/jetbrains-installer.test.ts | 2 + docs/advanced-usage.md | 9 ---- 3 files changed, 23 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 4b335dc8..3b38f3c5 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,13 @@ Set up Java for GitHub Actions workflows. `setup-java` installs a requested Java ```yaml steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v5 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: '25' - run: java --version ``` -> [!NOTE] -> 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 -> -> ```yaml -> - uses: actions/setup-java@main -> ``` -> -> For production workflows, it is recommended to use the latest stable release `v5`. - ## Contents - [What it does](#what-it-does) @@ -54,15 +45,16 @@ steps: ## What's new -### V6 (in development) +### V6 - Migrated the action implementation to ESM to support the latest `@actions/*` packages. -- Added the `oracle-openjdk` distribution for OpenJDK builds from Oracle. +- Added the `oracle-openjdk`, `redhat`, and `liberica-nik` distributions. - Added `java-version: latest` to resolve the newest stable GA release from the distribution's remote metadata. -- JDK downloads now automatically verify authoritative checksums for [supported distributions](#download-integrity-and-signatures). +- JDK downloads now automatically verify authoritative checksums, and package signature verification defaults to enabled for Temurin and Microsoft builds. - Added `force-download: true` to bypass the tool cache and perform a reproducible fresh install. - Dependency caching now supports custom paths with `cache-path` and restore-only operation with `cache-read-only: true`. - Downloaded JDKs are now [cached](#caching-jdk-installations) automatically when `cache` is set; use `cache-jdk` to enable or disable it independently. +- Maven configuration now supports multiple server credentials and custom dependency-resolution repositories. - Set `problem-matcher: false` to disable Java compiler and uncaught-exception annotations. - GraalVM distributions now set `GRAALVM_HOME` in addition to `JAVA_HOME`. - Invalid boolean values, unsupported distribution/package/platform combinations, and mismatched Maven toolchain ID counts now fail with targeted errors. @@ -89,7 +81,7 @@ steps: ### Older versions > [!WARNING] -> `actions/setup-java` versions `v1` through `v4` are deprecated. Upgrade workflows to `actions/setup-java@v5`, the latest stable release. +> `actions/setup-java` versions `v1` through `v4` are deprecated. Upgrade workflows to `actions/setup-java@v6`, the latest stable release. ## Usage @@ -98,7 +90,7 @@ steps: ```yaml steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v5 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: '25' @@ -110,7 +102,7 @@ steps: ```yaml steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v5 + - uses: actions/setup-java@v6 with: distribution: microsoft java-version: '25' @@ -122,7 +114,7 @@ steps: ```yaml steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v5 + - uses: actions/setup-java@v6 with: distribution: temurin java-version-file: .java-version @@ -136,7 +128,7 @@ Supported version files are `.java-version`, `.tool-versions`, and `.sdkmanrc`. ```yaml steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v5 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: latest @@ -267,7 +259,7 @@ Set `cache` to `maven`, `gradle`, or `sbt` to cache dependencies with minimal co ```yaml steps: - uses: actions/checkout@v7 - - uses: actions/setup-java@v5 + - uses: actions/setup-java@v6 with: distribution: temurin java-version: '25' @@ -286,7 +278,7 @@ The primary dependency cache key is `setup-java--- { + jest.setTimeout(10_000); + let spyHttpClient: any; let spyCoreError: any; const originalGitHubToken = process.env.GITHUB_TOKEN; diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index ff198920..04289f7a 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -39,15 +39,6 @@ See [action.yml](../action.yml) for more details on task inputs. -> [!NOTE] -> The examples on this page reference `actions/setup-java@v6`, which is still in -> development on the `main` branch and is not yet published as a release tag. To -> try the V6 features documented here (`cache-jdk`, `force-download`, -> `problem-matcher`, `cache-path`, `cache-read-only`, `java-version: latest`, -> `oracle-openjdk`, and the `*-env-var` input names), reference -> `actions/setup-java@main`. For production workflows use the latest stable -> release, `actions/setup-java@v5`, as shown in the [README](../README.md). - ## Selecting a Java distribution `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.