diff --git a/dist/index.js b/dist/index.js
index 5117bf97..534e3bc2 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -2662,6 +2662,9 @@ function run() {
     return __awaiter(this, void 0, void 0, function* () {
         try {
             let version = core.getInput('python-version');
+            if (version.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');
+            }
             if (version) {
                 const arch = core.getInput('architecture', { required: true });
                 const installed = yield finder.findPythonVersion(version, arch);
diff --git a/src/setup-python.ts b/src/setup-python.ts
index b22d83c2..ea141cb6 100644
--- a/src/setup-python.ts
+++ b/src/setup-python.ts
@@ -5,6 +5,11 @@ import * as path from 'path';
 async function run() {
   try {
     let version = core.getInput('python-version');
+    if (version.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'
+      );
+    }
     if (version) {
       const arch: string = core.getInput('architecture', {required: true});
       const installed = await finder.findPythonVersion(version, arch);