Compare commits

..

No commits in common. "main" and "v5.1.0" have entirely different histories.
main ... v5.1.0

86 changed files with 102651 additions and 149970 deletions

View file

@ -24,7 +24,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@ -51,7 +51,7 @@ jobs:
needs: gradle1-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@ -76,7 +76,7 @@ jobs:
needs: gradle1-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java

View file

@ -24,7 +24,7 @@ jobs:
os: [macos-15-intel, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@ -50,7 +50,7 @@ jobs:
needs: gradle-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle
uses: ./
id: setup-java
@ -73,7 +73,7 @@ jobs:
os: [macos-15-intel, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for maven
uses: ./
id: setup-java
@ -97,7 +97,7 @@ jobs:
needs: maven-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for maven
uses: ./
id: setup-java
@ -124,7 +124,7 @@ jobs:
os: [macos-15-intel, windows-latest, ubuntu-22.04]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for sbt
uses: ./
id: setup-java
@ -174,7 +174,7 @@ jobs:
needs: sbt-save
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Run setup-java with the cache for sbt
uses: ./
id: setup-java

View file

@ -21,7 +21,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Download Adopt OpenJDK file
run: |
if ($IsLinux) {
@ -58,7 +58,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Download Zulu OpenJDK file
run: |
if ($IsLinux) {
@ -95,7 +95,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Download Eclipse Temurin file
run: |
if ($IsLinux) {

View file

@ -25,7 +25,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -60,7 +60,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Create fake settings.xml
run: |
$xmlDirectory = Join-Path $HOME ".m2"
@ -96,7 +96,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Create fake settings.xml
run: |
$xmlDirectory = Join-Path $HOME ".m2"
@ -133,7 +133,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java

View file

@ -73,7 +73,7 @@ jobs:
version: '24-ea'
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -123,7 +123,7 @@ jobs:
version: '17.0.7'
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -158,7 +158,7 @@ jobs:
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -194,7 +194,7 @@ jobs:
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -233,7 +233,7 @@ jobs:
version: ['17-ea', '15.0.0-ea.14']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -255,7 +255,7 @@ jobs:
version: ['17-ea']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -277,7 +277,7 @@ jobs:
version: ['17-ea', '21-ea']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -364,7 +364,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -392,7 +392,7 @@ jobs:
version: ['11']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: setup-java
uses: ./
id: setup-java
@ -415,7 +415,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Create .java-version file
shell: bash
run: echo "17" > .java-version
@ -444,7 +444,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Create .java-version file
shell: bash
run: echo "11" > .java-version
@ -472,7 +472,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Create .java-version file
shell: bash
run: echo "17.0.10" > .java-version
@ -500,7 +500,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc']
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Create .java-version file
shell: bash
run: echo "openjdk64-17.0.10" > .java-version

View file

@ -15,7 +15,7 @@ jobs:
steps:
- name: Checking out
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: Publish
id: publish
uses: actions/publish-immutable-action@v0.0.4

View file

@ -13,4 +13,3 @@ allowed:
reviewed:
npm:
- "@actions/http-client" # MIT (license text present), but detected as "other"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@azure/ms-rest-js.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@opentelemetry/api.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@protobuf-ts/plugin.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/@protobuf-ts/protoc.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@types/node-fetch.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/@types/tunnel.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/asynckit.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/combined-stream.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/delayed-stream.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/dunder-proto.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/es-define-property.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/es-object-atoms.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/es-set-tostringtag.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/form-data-2.5.5.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/form-data-4.0.4.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/function-bind.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/get-intrinsic.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/gopd.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/has-symbols.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/has-tostringtag.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/hasown.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/math-intrinsics.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/node-fetch.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/safe-buffer.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/sax.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/tslib-1.14.1.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/typescript.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/webidl-conversions.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/whatwg-url.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/xml2js.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/xmlbuilder.dep.yml generated Normal file

Binary file not shown.

View file

@ -78,28 +78,28 @@ For information about the latest releases, recent updates, and newly supported d
#### Eclipse Temurin
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '25'
java-version: '21'
- run: java HelloWorldApp.java
```
#### Azul Zulu OpenJDK
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '25'
java-version: '21'
- run: java HelloWorldApp.java
```
#### 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`, `16`, `17`, `21`, `25`
- major versions: `8`, `11`, `16`, `17`, `21`
- more specific versions: `8.0.282+8`, `8.0.232`, `11.0`, `11.0.4`, `17.0`
- early access (EA) versions: `15-ea`, `15.0.0-ea`
@ -145,31 +145,26 @@ The cache input is optional, and caching is turned off by default.
#### Caching gradle dependencies
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
java-version: '21'
cache: 'gradle'
cache-dependency-path: | # optional
sub-project/*.gradle*
sub-project/**/gradle-wrapper.properties
- run: ./gradlew build --no-daemon
```
Using the `cache: gradle` provides a simple and effective way to cache Gradle dependencies with minimal configuration.
For projects that require more advanced `Gradle` caching features, such as caching build outputs, support for Gradle configuration cache, encrypted cache storage, fine-grained cache control (including options to enable or disable the cache, set it to read-only or write-only, perform automated cleanup, and define custom cache rules), or optimized performance for complex CI workflows, consider using [`gradle/actions/setup-gradle`](https://github.com/gradle/actions/tree/main/setup-gradle).
For setup details and a comprehensive overview of all available features, visit the [setup-gradle documentation](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md).
#### Caching maven dependencies
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
java-version: '21'
cache: 'maven'
cache-dependency-path: 'sub-project/pom.xml' # optional
- name: Build with Maven
@ -179,11 +174,11 @@ steps:
#### Caching sbt dependencies
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
java-version: '21'
cache: 'sbt'
cache-dependency-path: | # optional
sub-project/build.sbt
@ -199,11 +194,11 @@ Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
java-version: '21'
cache: 'gradle'
- run: ./gradlew build --no-daemon
```
@ -219,11 +214,11 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
java-version: '21'
check-latest: true
- run: java HelloWorldApp.java
```
@ -235,10 +230,10 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '8', '11', '17', '21', '25' ]
java: [ '8', '11', '17', '21' ]
name: Java ${{ matrix.Java }} sample
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Setup java
uses: actions/setup-java@v5
with:

126698
dist/cleanup/index.js vendored

File diff suppressed because one or more lines are too long

124794
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

View file

@ -31,7 +31,7 @@ Inputs `java-version` and `distribution` are mandatory and needs to be provided.
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
@ -44,7 +44,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'adopt-hotspot'
@ -56,7 +56,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
@ -69,7 +69,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'liberica'
@ -82,7 +82,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'microsoft'
@ -111,7 +111,7 @@ If the runner is not able to access github.com, any Java versions requested duri
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'corretto'
@ -124,7 +124,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'oracle'
@ -137,7 +137,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'dragonwell'
@ -149,7 +149,7 @@ steps:
**NOTE:** An OpenJDK release maintained and supported by SAP
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'sapmachine'
@ -162,7 +162,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'graalvm'
@ -181,7 +181,7 @@ For example, `11.0.24` is not available but `11.0.16` is.
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
@ -194,7 +194,7 @@ GitHub token to the action to increase the rate limit. Set the `GITHUB_TOKEN` en
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
@ -219,7 +219,7 @@ The available package types are:
## Installing custom Java package type
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: '<distribution>'
@ -232,7 +232,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: '<distribution>'
@ -296,7 +296,7 @@ jobs:
java: [ '8', '11' ]
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Setup java
uses: actions/setup-java@v5
with:
@ -316,7 +316,7 @@ jobs:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Setup java
uses: actions/setup-java@v5
with:
@ -333,7 +333,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
@ -446,7 +446,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Set up JDK 11 for Shared Runner
uses: actions/setup-java@v5
with:
@ -472,7 +472,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v5
@ -574,7 +574,7 @@ Each JDK provider will receive a default `id` based on the combination of `distr
```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'

979
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "setup-java",
"version": "5.2.0",
"version": "5.0.0",
"private": true,
"description": "setup java action",
"main": "dist/setup/index.js",
@ -29,7 +29,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^5.0.1",
"@actions/cache": "^4.0.3",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.0.4",
"@actions/glob": "^0.5.0",

View file

@ -83,7 +83,7 @@ export abstract class JavaBase {
const isRetryable =
(error instanceof tc.HTTPError &&
error.httpStatusCode &&
[429, 502, 503, 504, 522].includes(error.httpStatusCode)) ||
[429, 502, 503, 504].includes(error.httpStatusCode)) ||
retryableCodes.includes(error?.code) ||
(error?.errors &&
Array.isArray(error.errors) &&