Compare commits

...

2 Commits
v5.0.0 ... main

Author SHA1 Message Date
dependabot[bot]
a7ab372554
Bump prettier from 2.8.8 to 3.6.2 (#873)
Some checks failed
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (jetbrains, jre+jcef, ubuntu-latest, 17) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (jetbrains, jre+jcef, ubuntu-latest, 21) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (jetbrains, jre, macos-13, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (jetbrains, jre, ubuntu-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (jetbrains, jre, windows-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (liberica, jdk+fx, ubuntu-latest, 21) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (liberica, jre+fx, ubuntu-latest, 11) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (liberica, jre, macos-13, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (liberica, jre, ubuntu-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (liberica, jre, windows-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (sapmachine, jre, macos-13, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (sapmachine, jre, ubuntu-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (sapmachine, jre, windows-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (semeru, jre, macos-13, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (semeru, jre, ubuntu-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (semeru, jre, windows-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (temurin, jre, macos-13, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (temurin, jre, ubuntu-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (temurin, jre, windows-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (zulu, jdk+fx, ubuntu-latest, 21.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (zulu, jre+fx, ubuntu-latest, 21) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (zulu, jre, macos-13, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (zulu, jre, ubuntu-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} (zulu, jre, windows-latest, 17.0) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} (corretto, ubuntu-22.04, 11) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} (corretto, windows-latest, 11) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} (liberica, ubuntu-22.04, 11) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} (liberica, windows-latest, 11) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} (zulu, ubuntu-22.04, 11) (push) Has been cancelled
Validate Java e2e / ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} (zulu, windows-latest, 11) (push) Has been cancelled
* Bump prettier from 2.8.8 to 3.6.2

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.6.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* doc update and check failure fix

* npm run format-check

* doc format update

* doc update

* doc update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-09-09 10:02:46 -05:00
lmvysakh
d0351b4837
Update documentation to use checkout and Java v5 (#903)
Some checks failed
Licensed / Licensed (push) Failing after 0s
Update configuration files / Update configuration files (push) Failing after 0s
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Co-authored-by: lmvysakh <lmvysakh@github.com>
2025-09-03 14:04:05 -05:00
9 changed files with 99 additions and 96 deletions

View File

@ -18,11 +18,20 @@ The `setup-java` action provides the following functionality for GitHub Actions
This action allows you to work with Java and Scala projects. This action allows you to work with Java and Scala projects.
## Breaking changes in V5
- Upgraded action from node20 to node24
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
For more details, see the full release notes on the [releases page](https://github.com/actions/setup-java/releases/tag/v5.0.0)
## V2 vs V1 ## V2 vs V1
- 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. - 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.
- 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. - 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.
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).
## Usage ## Usage
- `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. - `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.
@ -69,8 +78,8 @@ This action allows you to work with Java and Scala projects.
#### Eclipse Temurin #### Eclipse Temurin
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' # See 'Supported distributions' for available options distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21' java-version: '21'
@ -80,8 +89,8 @@ steps:
#### Azul Zulu OpenJDK #### Azul Zulu OpenJDK
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'zulu' # See 'Supported distributions' for available options distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21' java-version: '21'
@ -136,8 +145,8 @@ The cache input is optional, and caching is turned off by default.
#### Caching gradle dependencies #### Caching gradle dependencies
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '21'
@ -151,8 +160,8 @@ steps:
#### Caching maven dependencies #### Caching maven dependencies
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '21'
@ -165,8 +174,8 @@ steps:
#### Caching sbt dependencies #### Caching sbt dependencies
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '21'
@ -185,8 +194,8 @@ Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a
env: env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5' SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '21'
@ -205,8 +214,8 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '21'
@ -224,9 +233,9 @@ jobs:
java: [ '8', '11', '17', '21' ] java: [ '8', '11', '17', '21' ]
name: Java ${{ matrix.Java }} sample name: Java ${{ matrix.Java }} sample
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Setup java - name: Setup java
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
@ -239,7 +248,7 @@ All versions are added to the PATH. The last version will be used and available
```yaml ```yaml
steps: steps:
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: | java-version: |

View File

@ -150,9 +150,8 @@ describe('getAvailableVersions', () => {
}); });
mockPlatform(distribution, platform); mockPlatform(distribution, platform);
const availableVersion = await distribution['findPackageForDownload']( const availableVersion =
version await distribution['findPackageForDownload'](version);
);
expect(availableVersion).not.toBeNull(); expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink); expect(availableVersion.url).toBe(expectedLink);
}); });
@ -222,9 +221,8 @@ describe('getAvailableVersions', () => {
const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`; const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`;
const availableVersion = await distribution['findPackageForDownload']( const availableVersion =
'17' await distribution['findPackageForDownload']('17');
);
expect(availableVersion).not.toBeNull(); expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink); expect(availableVersion.url).toBe(expectedLink);
} }

View File

@ -206,9 +206,8 @@ describe('getAvailableVersions', () => {
}); });
mockPlatform(distribution, platform); mockPlatform(distribution, platform);
const availableVersion = await distribution['findPackageForDownload']( const availableVersion =
jdkVersion await distribution['findPackageForDownload'](jdkVersion);
);
expect(availableVersion).not.toBeNull(); expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink); expect(availableVersion.url).toBe(expectedLink);
} }

View File

@ -76,9 +76,8 @@ describe('findPackageForDownload', () => {
checkLatest: false checkLatest: false
}); });
distribution['getAvailableVersions'] = async () => manifestData as any; distribution['getAvailableVersions'] = async () => manifestData as any;
const resolvedVersion = await distribution['findPackageForDownload']( const resolvedVersion =
input await distribution['findPackageForDownload'](input);
);
const url = resolvedVersion.url; const url = resolvedVersion.url;
const options = {method: 'HEAD'}; const options = {method: 'HEAD'};

View File

@ -61,9 +61,8 @@ describe('getAvailableVersions', () => {
mockPlatform(distribution, 'linux'); mockPlatform(distribution, 'linux');
const availableVersion = await distribution['findPackageForDownload']( const availableVersion =
version await distribution['findPackageForDownload'](version);
);
expect(availableVersion).not.toBeNull(); expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe( expect(availableVersion.url).toBe(
'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz' 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz'
@ -230,9 +229,8 @@ describe('getAvailableVersions', () => {
}); });
mockPlatform(distribution, platform); mockPlatform(distribution, platform);
const availableVersion = await distribution['findPackageForDownload']( const availableVersion =
normalizedVersion await distribution['findPackageForDownload'](normalizedVersion);
);
expect(availableVersion).not.toBeNull(); expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink); expect(availableVersion.url).toBe(expectedLink);
} }

View File

@ -31,8 +31,8 @@ Inputs `java-version` and `distribution` are mandatory and needs to be provided.
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '21' java-version: '21'
@ -44,8 +44,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'adopt-hotspot' distribution: 'adopt-hotspot'
java-version: '11' java-version: '11'
@ -56,8 +56,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: '21' java-version: '21'
@ -69,8 +69,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'liberica' distribution: 'liberica'
java-version: '21' java-version: '21'
@ -82,8 +82,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'microsoft' distribution: 'microsoft'
java-version: '21' java-version: '21'
@ -97,7 +97,7 @@ steps:
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action: To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action:
```yaml ```yaml
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
token: ${{ secrets.GH_DOTCOM_TOKEN }} token: ${{ secrets.GH_DOTCOM_TOKEN }}
distribution: 'microsoft' distribution: 'microsoft'
@ -111,8 +111,8 @@ If the runner is not able to access github.com, any Java versions requested duri
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'corretto' distribution: 'corretto'
java-version: '21' java-version: '21'
@ -124,8 +124,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'oracle' distribution: 'oracle'
java-version: '21' java-version: '21'
@ -137,8 +137,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'dragonwell' distribution: 'dragonwell'
java-version: '8' java-version: '8'
@ -149,8 +149,8 @@ steps:
**NOTE:** An OpenJDK release maintained and supported by SAP **NOTE:** An OpenJDK release maintained and supported by SAP
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'sapmachine' distribution: 'sapmachine'
java-version: '21' java-version: '21'
@ -162,8 +162,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'graalvm' distribution: 'graalvm'
java-version: '21' java-version: '21'
@ -181,8 +181,8 @@ For example, `11.0.24` is not available but `11.0.16` is.
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'jetbrains' distribution: 'jetbrains'
java-version: '11' java-version: '11'
@ -194,8 +194,8 @@ GitHub token to the action to increase the rate limit. Set the `GITHUB_TOKEN` en
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'jetbrains' distribution: 'jetbrains'
java-version: '17' java-version: '17'
@ -219,8 +219,8 @@ The available package types are:
## Installing custom Java package type ## Installing custom Java package type
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: '11' java-version: '11'
@ -232,8 +232,8 @@ steps:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: '11' java-version: '11'
@ -249,7 +249,7 @@ steps:
- run: | - run: |
download_url="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz" download_url="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'jdkfile' distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -275,7 +275,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is
latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver') latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver')
echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT" echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT"
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'jdkfile' distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -296,9 +296,9 @@ jobs:
java: [ '8', '11' ] java: [ '8', '11' ]
name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Setup java - name: Setup java
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: ${{ matrix.distribution }} distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
@ -316,9 +316,9 @@ jobs:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Setup java - name: Setup java
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
@ -333,9 +333,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: '11' java-version: '11'
@ -349,7 +349,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
- name: Set up Apache Maven Central - name: Set up Apache Maven Central
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: # running setup-java again overwrites the settings.xml with: # running setup-java again overwrites the settings.xml
distribution: 'temurin' distribution: 'temurin'
java-version: '11' java-version: '11'
@ -446,9 +446,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Set up JDK 11 for Shared Runner - name: Set up JDK 11 for Shared Runner
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: '11' java-version: '11'
@ -472,10 +472,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: '11' java-version: '11'
@ -509,14 +509,14 @@ Subsequent calls to `setup-java` with distinct distribution and version paramete
```yaml ```yaml
steps: steps:
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: | java-version: |
8 8
11 11
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: '15' java-version: '15'
@ -528,7 +528,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi
- run: | - run: |
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz" download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'jdkfile' distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -545,7 +545,7 @@ Each JDK provider will receive a default `vendor` using the `distribution` input
- run: | - run: |
download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz" download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'jdkfile' distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz jdkFile: ${{ runner.temp }}/java_package.tar.gz
@ -560,7 +560,7 @@ In case you install multiple versions of Java at once with multi-line `java-vers
```yaml ```yaml
steps: steps:
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: | java-version: |
@ -574,8 +574,8 @@ Each JDK provider will receive a default `id` based on the combination of `distr
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '11' java-version: '11'
@ -587,7 +587,7 @@ In case you install multiple versions of Java at once you can use the same synta
```yaml ```yaml
steps: steps:
- uses: actions/setup-java@v4 - uses: actions/setup-java@v5
with: with:
distribution: '<distribution>' distribution: '<distribution>'
java-version: | java-version: |

13
package-lock.json generated
View File

@ -32,7 +32,7 @@
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"prettier": "^2.8.4", "prettier": "^3.6.2",
"ts-jest": "^29.3.0", "ts-jest": "^29.3.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
@ -4876,15 +4876,16 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "2.8.8", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
"dev": true, "dev": true,
"license": "MIT",
"bin": { "bin": {
"prettier": "bin-prettier.js" "prettier": "bin/prettier.cjs"
}, },
"engines": { "engines": {
"node": ">=10.13.0" "node": ">=14"
}, },
"funding": { "funding": {
"url": "https://github.com/prettier/prettier?sponsor=1" "url": "https://github.com/prettier/prettier?sponsor=1"

View File

@ -4,7 +4,7 @@
"private": true, "private": true,
"description": "setup java action", "description": "setup java action",
"main": "dist/setup/index.js", "main": "dist/setup/index.js",
"engines": { "engines": {
"node": ">=24.0.0" "node": ">=24.0.0"
}, },
"scripts": { "scripts": {
@ -52,7 +52,7 @@
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-circus": "^29.7.0", "jest-circus": "^29.7.0",
"prettier": "^2.8.4", "prettier": "^3.6.2",
"ts-jest": "^29.3.0", "ts-jest": "^29.3.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },

View File

@ -59,9 +59,8 @@ export async function createToolchainsSettings({
// when an alternate m2 location is specified use only that location (no .m2 directory) // when an alternate m2 location is specified use only that location (no .m2 directory)
// otherwise use the home/.m2/ path // otherwise use the home/.m2/ path
await io.mkdirP(settingsDirectory); await io.mkdirP(settingsDirectory);
const originalToolchains = await readExistingToolchainsFile( const originalToolchains =
settingsDirectory await readExistingToolchainsFile(settingsDirectory);
);
const updatedToolchains = generateToolchainDefinition( const updatedToolchains = generateToolchainDefinition(
originalToolchains, originalToolchains,
jdkInfo.version, jdkInfo.version,