From 0f62d2ad8407a414cddd4790bed06fd9ebda0f56 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Tue, 4 Aug 2026 11:58:48 -0400 Subject: [PATCH] Deprecate setup-java v1 (#1197) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- action.yml | 1 + dist/setup/index.js | 2 ++ src/setup-java.ts | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/action.yml b/action.yml index 74572687..e25fb102 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,7 @@ name: 'Setup Java JDK' description: 'Set up a specific version of the Java JDK and add the command-line tools to the PATH' +deprecationMessage: 'setup-java v1 is deprecated and will no longer receive updates. Please migrate to actions/setup-java@v5.' author: 'GitHub' inputs: java-version: diff --git a/dist/setup/index.js b/dist/setup/index.js index 119c80fd..3d1b1cb2 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -30603,9 +30603,11 @@ const auth = __importStar(__webpack_require__(331)); const gpg = __importStar(__webpack_require__(884)); const constants = __importStar(__webpack_require__(694)); const path = __importStar(__webpack_require__(622)); +const DEPRECATION_WARNING = 'setup-java v1 is deprecated and will no longer receive updates. Please migrate to actions/setup-java@v5.'; function run() { return __awaiter(this, void 0, void 0, function* () { try { + core.warning(DEPRECATION_WARNING); let version = core.getInput(constants.INPUT_VERSION); if (!version) { version = core.getInput(constants.INPUT_JAVA_VERSION, { required: true }); diff --git a/src/setup-java.ts b/src/setup-java.ts index 5ba35297..2b562c9b 100644 --- a/src/setup-java.ts +++ b/src/setup-java.ts @@ -5,8 +5,13 @@ import * as gpg from './gpg'; import * as constants from './constants'; import * as path from 'path'; +const DEPRECATION_WARNING = + 'setup-java v1 is deprecated and will no longer receive updates. Please migrate to actions/setup-java@v5.'; + async function run() { try { + core.warning(DEPRECATION_WARNING); + let version = core.getInput(constants.INPUT_VERSION); if (!version) { version = core.getInput(constants.INPUT_JAVA_VERSION, {required: true});