You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename jdkFile input to jdk-file with deprecated alias (#1083)
* Rename jdkFile input to jdk-file with deprecated alias
Add a standardized `jdk-file` input to match the lowercase-dash naming
used by every other action input. The camelCase `jdkFile` input is kept
as a deprecated alias: it still works, but emits a deprecation warning and
may be removed in a future release. `jdk-file` takes precedence when both
are provided.
Updates docs and the local-file e2e workflow (one case intentionally keeps
using the deprecated alias for coverage) and regenerates the dist bundles.
Fixes#1077
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* docs: keep jdkFile in switching-to-v2 guide
The switching-to-v2 migration guide uses actions/setup-java@v2, which only supports the camelCase jdkFile input. Keep the new jdk-file spelling in current-version docs only.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ For more details, see the full release notes on the [releases page](https://git
41
41
42
42
-`architecture`: The target architecture of the package. Possible values: `x86`, `x64`, `armv7`, `aarch64`, `ppc64le`. Default value: Derived from the runner machine.
43
43
44
-
-`jdkFile`: If a use-case requires a custom distribution setup-java uses the compressed JDK from the location pointed by this input and will take care of the installation and caching on the VM. Note: `distribution` must be set to 'jdkfile' (case-sensitive; all lowercase) when using this option.
44
+
-`jdk-file`: If a use-case requires a custom distribution setup-java uses the compressed JDK from the location pointed by this input and will take care of the installation and caching on the VM. Note: `distribution` must be set to 'jdkfile' (case-sensitive; all lowercase) when using this option. (The camelCase `jdkFile` input is still accepted as a deprecated alias and may be removed in a future release.)
45
45
46
46
-`check-latest`: Setting this option makes the action to check for the latest available version for the version spec.
Copy file name to clipboardExpand all lines: action.yml
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,13 @@ inputs:
19
19
architecture:
20
20
description: "The architecture of the package (defaults to the action runner's architecture)"
21
21
required: false
22
-
jdkFile:
22
+
jdk-file:
23
23
description: 'Path to where the compressed JDK is located'
24
24
required: false
25
+
jdkFile:
26
+
description: 'Deprecated alias for `jdk-file`. Path to where the compressed JDK is located. Use `jdk-file` instead; this alias may be removed in a future release.'
27
+
required: false
28
+
deprecationMessage: 'The `jdkFile` input is deprecated. Use `jdk-file` instead.'
25
29
check-latest:
26
30
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec'
Copy file name to clipboardExpand all lines: docs/advanced-usage.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -330,7 +330,7 @@ In this example, `JAVA_HOME` and `java` on `PATH` point to Java 17, while Java 2
330
330
If your use-case requires a custom distribution or a version that is not provided by setup-java, you can download it manually and setup-java will take care of the installation and caching on the VM:
331
331
332
332
> [!NOTE]
333
-
> This approach also lets you use builds that setup-java does not provide directly, such as **Early Access (EA)** or other unreleased JDK builds (for example, an upcoming feature release or a Loom/Valhalla preview build). Download the desired archive in a prior step and point `jdkFile` at it; setup-java will extract, install, and cache it just like a supported distribution. When targeting multiple architectures, select the correct binary per architecture in your workflow (for example, with a build matrix).
333
+
> This approach also lets you use builds that setup-java does not provide directly, such as **Early Access (EA)** or other unreleased JDK builds (for example, an upcoming feature release or a Loom/Valhalla preview build). Download the desired archive in a prior step and point `jdk-file` at it; setup-java will extract, install, and cache it just like a supported distribution. When targeting multiple architectures, select the correct binary per architecture in your workflow (for example, with a build matrix).
334
334
335
335
```yaml
336
336
steps:
@@ -340,7 +340,7 @@ steps:
340
340
- uses: actions/setup-java@v5
341
341
with:
342
342
distribution: 'jdkfile'
343
-
jdkFile: ${{ runner.temp }}/java_package.tar.gz
343
+
jdk-file: ${{ runner.temp }}/java_package.tar.gz
344
344
java-version: '11.0.0'
345
345
architecture: x64
346
346
@@ -357,7 +357,7 @@ steps:
357
357
- uses: actions/setup-java@v5
358
358
with:
359
359
distribution: 'jdkfile'
360
-
jdkFile: ${{ runner.temp }}/java_package.tar.gz
360
+
jdk-file: ${{ runner.temp }}/java_package.tar.gz
361
361
java-version: '25.0.0-ea.36'
362
362
architecture: x64
363
363
@@ -383,7 +383,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is
`The '${constants.INPUT_JDK_FILE_DEPRECATED}' input is deprecated and may be removed in a future release. Please use '${constants.INPUT_JDK_FILE}' instead.`
0 commit comments