Rename jdkFile input to jdk-file with deprecated alias#1083
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
Pull request overview
Standardizes the action input name for providing a local JDK archive by introducing jdk-file (kebab-case) while keeping jdkFile working as a deprecated alias, aligning this input with the action’s existing input naming conventions.
Changes:
- Added
jdk-fileas the primary input and keptjdkFileas a deprecated alias (with warning + precedence rules). - Updated documentation and the local-file E2E workflow to use
jdk-file(while intentionally keeping one deprecated-alias path covered). - Regenerated
dist/bundles to reflect the updated runtime code.
Show a summary per file
| File | Description |
|---|---|
| src/setup-java.ts | Adds getJdkFileInput() helper to resolve jdk-file vs deprecated jdkFile and emit a warning for deprecated usage. |
| src/constants.ts | Renames the primary input constant to jdk-file and introduces a deprecated constant for jdkFile. |
| README.md | Updates input documentation to reference jdk-file and notes jdkFile deprecation. |
| docs/switching-to-v2.md | Updates the local-file example to use jdk-file (but the example still targets actions/setup-java@v2). |
| docs/advanced-usage.md | Updates examples and narrative to use jdk-file. |
| action.yml | Adds jdk-file input, keeps jdkFile with a deprecationMessage. |
| .github/workflows/e2e-local-file.yml | Migrates Corretto/Zulu to jdk-file and keeps Temurin on deprecated jdkFile to ensure backward-compat coverage. |
| dist/setup/index.js | Updates bundled constants and input resolution logic in the compiled distribution. |
| dist/cleanup/index.js | Updates bundled constants in the compiled cleanup distribution. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/9 changed files
- Comments generated: 1
- Review effort level: Low
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
jdkFilewas the only action input using camelCase while every other input follows the lowercase-dash convention (java-version,check-latest, etc.). This standardizes the naming.This adds a new
jdk-fileinput and keepsjdkFileworking as a deprecated alias:jdk-filetakes precedence when both are provided.jdkFilealias still works but emits acore.warningtelling the user it is deprecated and may be removed in a future release.getJdkFileInput()helper insetup-java.ts;action.ymlalso carries adeprecationMessageon thejdkFileinput.Docs (README, advanced-usage, switching-to-v2) now use
jdk-file. The local-file e2e workflow usesjdk-filefor the Corretto and Zulu cases, and intentionally keeps the Temurin case on thejdkFilealias so the backward-compatible path stays covered. Thedist/bundles were regenerated.Note: this only touches the input property name. The separate
distribution: 'jdkfile'value is unrelated and left unchanged.Related issue:
Fixes: #1077
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.