From c374f3b7b5c7c3a3991e319d83573ff03f027270 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 23 May 2023 15:58:13 +0200 Subject: [PATCH] add warning --- dist/setup/index.js | 3 +++ src/setup-python.ts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/dist/setup/index.js b/dist/setup/index.js index 24c41bfa..6b34b469 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -7010,6 +7010,9 @@ function run() { try { const version = core.getInput('python-version'); if (version) { + if (version.trim().startsWith('2')) { + core.warning('The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672'); + } let pythonVersion; const arch = core.getInput('architecture') || os.arch(); if (isPyPyVersion(version)) { diff --git a/src/setup-python.ts b/src/setup-python.ts index 3a19efe1..07672d8f 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -28,6 +28,11 @@ async function run() { try { const version = core.getInput('python-version'); if (version) { + if (version.trim().startsWith('2')) { + core.warning( + 'The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672' + ); + } let pythonVersion: string; const arch: string = core.getInput('architecture') || os.arch(); if (isPyPyVersion(version)) {