Compare commits

..

4 Commits

Author SHA1 Message Date
dependabot[bot]
31c8ec4acf Bump actions/publish-action from 0.3.0 to 0.4.0
Bumps [actions/publish-action](https://github.com/actions/publish-action) from 0.3.0 to 0.4.0.
- [Commits](https://github.com/actions/publish-action/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: actions/publish-action
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 03:35:27 +00:00
lmvysakh
d0351b4837 Update documentation to use checkout and Java v5 (#903)
Co-authored-by: lmvysakh <lmvysakh@github.com>
2025-09-03 14:04:05 -05:00
dependabot[bot]
dded088883 Bump actions/checkout from 4 to 5 (#896)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-20 21:56:38 -05:00
Salman Chishti
0913e9a06e Upgrade to node 24 (#888)
* Upgrade to node 24

Upgrading action to node 24 since new runner version.

* fix tests

* Fix tests and licences

* format

* format x2

* Upgrade Node.js version in workflow files to 24.x

* check failure fix

* check failures fix

* Fix mock platform

---------

Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
Co-authored-by: Haritha <73516759+HarithaVattikuti@users.noreply.github.com>
2025-08-20 14:07:47 -05:00
29 changed files with 208 additions and 325 deletions

View File

@@ -16,4 +16,4 @@ jobs:
name: Basic validation name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with: with:
node-version: '20.x' node-version: '24.x'

View File

@@ -16,4 +16,4 @@ jobs:
name: Check dist/ name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with: with:
node-version: '20.x' node-version: '24.x'

View File

@@ -24,13 +24,13 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest] os: [macos-latest, windows-latest, ubuntu-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle - name: Run setup-java with the cache for gradle
uses: ./ uses: ./
id: setup-java id: setup-java
with: with:
distribution: 'adopt' distribution: 'adopt'
java-version: '11' java-version: '17'
cache: gradle cache: gradle
cache-dependency-path: __tests__/cache/gradle1/*.gradle* cache-dependency-path: __tests__/cache/gradle1/*.gradle*
- name: Create files to cache - name: Create files to cache
@@ -51,7 +51,7 @@ jobs:
needs: gradle1-save needs: gradle1-save
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle - name: Run setup-java with the cache for gradle
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -76,7 +76,7 @@ jobs:
needs: gradle1-save needs: gradle1-save
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle - name: Run setup-java with the cache for gradle
uses: ./ uses: ./
id: setup-java id: setup-java

View File

@@ -24,13 +24,13 @@ jobs:
os: [macos-13, windows-latest, ubuntu-latest] os: [macos-13, windows-latest, ubuntu-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle - name: Run setup-java with the cache for gradle
uses: ./ uses: ./
id: setup-java id: setup-java
with: with:
distribution: 'adopt' distribution: 'adopt'
java-version: '11' java-version: '17'
cache: gradle cache: gradle
- name: Create files to cache - name: Create files to cache
# Need to avoid using Gradle daemon to stabilize the save process on Windows # Need to avoid using Gradle daemon to stabilize the save process on Windows
@@ -50,7 +50,7 @@ jobs:
needs: gradle-save needs: gradle-save
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for gradle - name: Run setup-java with the cache for gradle
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -73,7 +73,7 @@ jobs:
os: [macos-13, windows-latest, ubuntu-latest] os: [macos-13, windows-latest, ubuntu-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for maven - name: Run setup-java with the cache for maven
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -97,7 +97,7 @@ jobs:
needs: maven-save needs: maven-save
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for maven - name: Run setup-java with the cache for maven
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -124,7 +124,7 @@ jobs:
os: [macos-13, windows-latest, ubuntu-22.04] os: [macos-13, windows-latest, ubuntu-22.04]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for sbt - name: Run setup-java with the cache for sbt
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -174,7 +174,7 @@ jobs:
needs: sbt-save needs: sbt-save
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Run setup-java with the cache for sbt - name: Run setup-java with the cache for sbt
uses: ./ uses: ./
id: setup-java id: setup-java

View File

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

View File

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

View File

@@ -64,7 +64,7 @@ jobs:
version: '24-ea' version: '24-ea'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -114,7 +114,7 @@ jobs:
version: '17.0.7' version: '17.0.7'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -149,7 +149,7 @@ jobs:
os: macos-latest os: macos-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -185,7 +185,7 @@ jobs:
os: macos-latest os: macos-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -224,7 +224,7 @@ jobs:
version: ['17-ea', '15.0.0-ea.14'] version: ['17-ea', '15.0.0-ea.14']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -246,7 +246,7 @@ jobs:
version: ['17-ea'] version: ['17-ea']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -268,7 +268,7 @@ jobs:
version: ['17-ea', '21-ea'] version: ['17-ea', '21-ea']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -355,7 +355,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -383,7 +383,7 @@ jobs:
version: ['11'] version: ['11']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: setup-java - name: setup-java
uses: ./ uses: ./
id: setup-java id: setup-java
@@ -406,7 +406,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions'] java-version-file: ['.java-version', '.tool-versions']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Create .java-version file - name: Create .java-version file
shell: bash shell: bash
run: echo "17" > .java-version run: echo "17" > .java-version
@@ -435,7 +435,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions'] java-version-file: ['.java-version', '.tool-versions']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Create .java-version file - name: Create .java-version file
shell: bash shell: bash
run: echo "11" > .java-version run: echo "11" > .java-version
@@ -463,7 +463,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions'] java-version-file: ['.java-version', '.tool-versions']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Create .java-version file - name: Create .java-version file
shell: bash shell: bash
run: echo "17.0.10" > .java-version run: echo "17.0.10" > .java-version
@@ -491,7 +491,7 @@ jobs:
java-version-file: ['.java-version', '.tool-versions'] java-version-file: ['.java-version', '.tool-versions']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Create .java-version file - name: Create .java-version file
shell: bash shell: bash
run: echo "openjdk64-17.0.10" > .java-version run: echo "openjdk64-17.0.10" > .java-version

View File

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

View File

@@ -23,7 +23,7 @@ jobs:
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag id: update-major-tag
uses: actions/publish-action@v0.3.0 uses: actions/publish-action@v0.4.0
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -1,6 +1,6 @@
--- ---
name: "@types/node" name: "@types/node"
version: 20.11.24 version: 24.1.0
type: npm type: npm
summary: TypeScript definitions for node summary: TypeScript definitions for node
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node

View File

@@ -1,15 +1,17 @@
--- ---
name: undici-types name: undici-types
version: 5.26.5 version: 7.8.0
type: npm type: npm
summary: A stand-alone types package for Undici summary: A stand-alone types package for Undici
homepage: https://undici.nodejs.org homepage: https://undici.nodejs.org
license: mit license: mit
licenses: licenses:
- sources: Auto-generated MIT license text - sources: LICENSE
text: | text: |
MIT License MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights

View File

@@ -23,6 +23,8 @@ This action allows you to work with Java and Scala projects.
- 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 +71,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 +82,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 +138,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 +153,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 +167,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 +187,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 +207,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 +226,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 +241,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

@@ -191,7 +191,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const installerOptions: JavaInstallerOptions = { const installerOptions: JavaInstallerOptions = {
version: '17', version: '17',

View File

@@ -287,7 +287,7 @@ describe('setupJava', () => {
spyCoreSetOutput = jest.spyOn(core, 'setOutput'); spyCoreSetOutput = jest.spyOn(core, 'setOutput');
spyCoreSetOutput.mockImplementation(() => undefined); spyCoreSetOutput.mockImplementation(() => undefined);
jest.spyOn(os, 'arch').mockReturnValue('x86'); jest.spyOn(os, 'arch').mockReturnValue('x86' as ReturnType<typeof os.arch>);
}); });
afterEach(() => { afterEach(() => {

View File

@@ -203,28 +203,27 @@ describe('getAvailableVersions', () => {
}); });
it.each([ it.each([
['arm64', 'aarch64'], ['amd64', 'x64'],
['amd64', 'x64'] ['arm64', 'aarch64']
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const version = '17'; const distribution = new CorrettoDistribution({
const installerOptions: JavaInstallerOptions = { version: '17',
version,
architecture: '', // to get default value architecture: '', // to get default value
packageType: 'jdk', packageType: 'jdk',
checkLatest: false checkLatest: false
}; });
const distribution = new CorrettoDistribution(installerOptions);
mockPlatform(distribution, 'macos'); mockPlatform(distribution, 'macos');
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 = await distribution['findPackageForDownload'](
version '17'
); );
expect(availableVersion).not.toBeNull(); expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink); expect(availableVersion.url).toBe(expectedLink);

View File

@@ -98,31 +98,35 @@ describe('findPackageForDownload', () => {
}); });
it.each([ it.each([
['amd64', 'x64'], ['amd64', ['x64', 'amd64']],
['arm64', 'aarch64'] ['arm64', ['aarch64', 'arm64']]
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArchs: string[]) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
jest.spyOn(os, 'platform').mockReturnValue('linux'); .spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const version = '21'; const distribution = new GraalVMDistribution({
const distro = new GraalVMDistribution({ version: '21',
version,
architecture: '', // to get default value architecture: '', // to get default value
packageType: 'jdk', packageType: 'jdk',
checkLatest: false checkLatest: false
}); });
const osType = distribution.getPlatform(); const osType = distribution.getPlatform();
if (osType === 'windows' && distroArch == 'aarch64') { if (osType === 'windows' && distroArchs.includes('aarch64')) {
return; // skip, aarch64 is not available for Windows return; // skip, aarch64 is not available for Windows
} }
const archiveType = getDownloadArchiveExtension(); const archiveType = getDownloadArchiveExtension();
const result = await distro['findPackageForDownload'](version); const result = await distribution['findPackageForDownload']('21');
const expectedUrl = `https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_${osType}-${distroArch}_bin.${archiveType}`;
expect(result.url).toBe(expectedUrl); const expectedUrls = distroArchs.map(
distroArch =>
`https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_${osType}-${distroArch}_bin.${archiveType}`
);
expect(expectedUrls).toContain(result.url);
} }
); );

View File

@@ -105,9 +105,11 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => { async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const distribution = new LibericaDistributions({ const distributions = new LibericaDistributions({
version: '17', version: '17',
architecture: '', // to get default value architecture: '', // to get default value
packageType: 'jdk', packageType: 'jdk',
@@ -117,11 +119,11 @@ describe('getAvailableVersions', () => {
const additionalParams = const additionalParams =
'&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' + '&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' +
'updateVersion%2CbuildVersion'; 'updateVersion%2CbuildVersion';
distribution['getPlatformOption'] = () => 'macos'; distributions['getPlatformOption'] = () => 'macos';
const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=macos&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`; const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=macos&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`;
await distribution['getAvailableVersions'](); await distributions['getAvailableVersions']();
expect(spyHttpClient.mock.calls).toHaveLength(1); expect(spyHttpClient.mock.calls).toHaveLength(1);
expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl); expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl);

View File

@@ -105,7 +105,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => { async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const distribution = new LibericaDistributions({ const distribution = new LibericaDistributions({
version: '17', version: '17',

View File

@@ -105,7 +105,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => { async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const distribution = new LibericaDistributions({ const distribution = new LibericaDistributions({
version: '17', version: '17',

View File

@@ -95,7 +95,9 @@ describe('findPackageForDownload', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'platform').mockReturnValue('darwin'); jest.spyOn(os, 'platform').mockReturnValue('darwin');
const version = '17'; const version = '17';
@@ -119,7 +121,9 @@ describe('findPackageForDownload', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'platform').mockReturnValue('linux'); jest.spyOn(os, 'platform').mockReturnValue('linux');
const version = '17'; const version = '17';
@@ -143,7 +147,9 @@ describe('findPackageForDownload', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'platform').mockReturnValue('win32'); jest.spyOn(os, 'platform').mockReturnValue('win32');
const version = '17'; const version = '17';

View File

@@ -95,7 +95,9 @@ describe('findPackageForDownload', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
jest.spyOn(os, 'platform').mockReturnValue('linux'); jest.spyOn(os, 'platform').mockReturnValue('linux');
const version = '18'; const version = '18';

View File

@@ -147,7 +147,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => { async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(distroArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const installerOptions: JavaInstallerOptions = { const installerOptions: JavaInstallerOptions = {
version: '17', version: '17',

View File

@@ -1,5 +1,4 @@
import {HttpClient} from '@actions/http-client'; import {HttpClient} from '@actions/http-client';
import * as semver from 'semver';
import {ZuluDistribution} from '../../src/distributions/zulu/installer'; import {ZuluDistribution} from '../../src/distributions/zulu/installer';
import {IZuluVersions} from '../../src/distributions/zulu/models'; import {IZuluVersions} from '../../src/distributions/zulu/models';
import * as utils from '../../src/util'; import * as utils from '../../src/util';
@@ -126,7 +125,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => { async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const distribution = new ZuluDistribution({ const distribution = new ZuluDistribution({
version: '17', version: '17',

View File

@@ -126,7 +126,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => { async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const distribution = new ZuluDistribution({ const distribution = new ZuluDistribution({
version: '17', version: '17',
@@ -135,7 +137,9 @@ describe('getAvailableVersions', () => {
checkLatest: false checkLatest: false
}); });
distribution['getPlatformOption'] = () => 'linux'; distribution['getPlatformOption'] = () => 'linux';
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`; // Override extension for linux default arch case to match util behavior
spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz');
const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=tar.gz&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`;
await distribution['getAvailableVersions'](); await distribution['getAvailableVersions']();

View File

@@ -126,7 +126,9 @@ describe('getAvailableVersions', () => {
])( ])(
'defaults to os.arch(): %s mapped to distro arch: %s', 'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: DistroArch) => { async (osArch: string, distroArch: DistroArch) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch); jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const distribution = new ZuluDistribution({ const distribution = new ZuluDistribution({
version: '17', version: '17',

View File

@@ -81,6 +81,6 @@ outputs:
cache-hit: cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key' description: 'A boolean value to indicate an exact match was found for the primary key'
runs: runs:
using: 'node20' using: 'node24'
main: 'dist/setup/index.js' main: 'dist/setup/index.js'
post: 'dist/cleanup/index.js' post: 'dist/cleanup/index.js'

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: |

200
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "setup-java", "name": "setup-java",
"version": "4.0.0", "version": "5.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "setup-java", "name": "setup-java",
"version": "4.0.0", "version": "5.0.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^4.0.3", "@actions/cache": "^4.0.3",
@@ -21,10 +21,10 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.14", "@types/jest": "^29.5.14",
"@types/node": "^20.11.24", "@types/node": "^24.1.0",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.35.1", "@typescript-eslint/eslint-plugin": "^8.35.1",
"@typescript-eslint/parser": "^8.39.1", "@typescript-eslint/parser": "^8.35.1",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
@@ -35,6 +35,9 @@
"prettier": "^2.8.4", "prettier": "^2.8.4",
"ts-jest": "^29.3.0", "ts-jest": "^29.3.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
},
"engines": {
"node": ">=24.0.0"
} }
}, },
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {
@@ -1644,11 +1647,12 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.11.24", "version": "24.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~7.8.0"
} }
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
@@ -1751,16 +1755,16 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "8.39.1", "version": "8.35.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.1.tgz",
"integrity": "sha512-pUXGCuHnnKw6PyYq93lLRiZm3vjuslIy7tus1lIQTYVK9bL8XBgJnCWm8a0KcTtHC84Yya1Q6rtll+duSMj0dg==", "integrity": "sha512-3MyiDfrfLeK06bi/g9DqJxP5pV74LNv4rFTyvGDmT3x2p1yp1lOd+qYZfiRPIOf/oON+WRZR5wxxuF85qOar+w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.39.1", "@typescript-eslint/scope-manager": "8.35.1",
"@typescript-eslint/types": "8.39.1", "@typescript-eslint/types": "8.35.1",
"@typescript-eslint/typescript-estree": "8.39.1", "@typescript-eslint/typescript-estree": "8.35.1",
"@typescript-eslint/visitor-keys": "8.39.1", "@typescript-eslint/visitor-keys": "8.35.1",
"debug": "^4.3.4" "debug": "^4.3.4"
}, },
"engines": { "engines": {
@@ -1772,164 +1776,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0", "eslint": "^8.57.0 || ^9.0.0",
"typescript": ">=4.8.4 <6.0.0" "typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/project-service": {
"version": "8.39.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.1.tgz",
"integrity": "sha512-8fZxek3ONTwBu9ptw5nCKqZOSkXshZB7uAxuFF0J/wTMkKydjXCzqqga7MlFMpHi9DoG4BadhmTkITBcg8Aybw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.39.1",
"@typescript-eslint/types": "^8.39.1",
"debug": "^4.3.4"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
"version": "8.39.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.1.tgz",
"integrity": "sha512-RkBKGBrjgskFGWuyUGz/EtD8AF/GW49S21J8dvMzpJitOF1slLEbbHnNEtAHtnDAnx8qDEdRrULRnWVx27wGBw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.39.1",
"@typescript-eslint/visitor-keys": "8.39.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.39.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.1.tgz",
"integrity": "sha512-ePUPGVtTMR8XMU2Hee8kD0Pu4NDE1CN9Q1sxGSGd/mbOtGZDM7pnhXNJnzW63zk/q+Z54zVzj44HtwXln5CvHA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
"version": "8.39.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.1.tgz",
"integrity": "sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.39.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.1.tgz",
"integrity": "sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.39.1",
"@typescript-eslint/tsconfig-utils": "8.39.1",
"@typescript-eslint/types": "8.39.1",
"@typescript-eslint/visitor-keys": "8.39.1",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
"minimatch": "^9.0.4",
"semver": "^7.6.0",
"ts-api-utils": "^2.1.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.39.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.1.tgz",
"integrity": "sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.39.1",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/brace-expansion": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/@typescript-eslint/parser/node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/@typescript-eslint/project-service": { "node_modules/@typescript-eslint/project-service": {
@@ -5667,9 +5514,10 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "7.8.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
"license": "MIT"
}, },
"node_modules/update-browserslist-db": { "node_modules/update-browserslist-db": {
"version": "1.0.13", "version": "1.0.13",

View File

@@ -1,9 +1,12 @@
{ {
"name": "setup-java", "name": "setup-java",
"version": "4.0.0", "version": "5.0.0",
"private": true, "private": true,
"description": "setup java action", "description": "setup java action",
"main": "dist/setup/index.js", "main": "dist/setup/index.js",
"engines": {
"node": ">=24.0.0"
},
"scripts": { "scripts": {
"build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts", "build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts",
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"",
@@ -38,10 +41,10 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.14", "@types/jest": "^29.5.14",
"@types/node": "^20.11.24", "@types/node": "^24.1.0",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.35.1", "@typescript-eslint/eslint-plugin": "^8.35.1",
"@typescript-eslint/parser": "^8.39.1", "@typescript-eslint/parser": "^8.35.1",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",