diff --git a/action.yml b/action.yml index a1dd5b77..fda811da 100644 --- a/action.yml +++ b/action.yml @@ -19,6 +19,8 @@ inputs: outputs: python-version: description: "The installed python version. Useful when given a version range as input." + python-install-dir: + description: "The path where python was installed. (PYTHON_INSTALL_DIR)" runs: using: 'node12' main: 'dist/setup/index.js' diff --git a/src/find-pypy.ts b/src/find-pypy.ts index eb8dfac6..5489105e 100644 --- a/src/find-pypy.ts +++ b/src/find-pypy.ts @@ -53,6 +53,9 @@ export async function findPyPyVersion( core.addPath(pythonLocation); core.addPath(_binDir); + core.setOutput('python-version', resolvedPythonVersion); + core.setOutput('python-install-dir', installDir); + return {resolvedPyPyVersion, resolvedPythonVersion}; } diff --git a/src/find-python.ts b/src/find-python.ts index ff2a20d8..c6dcbf77 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -71,6 +71,7 @@ function usePyPy( const impl = 'pypy' + majorVersion.toString(); core.setOutput('python-version', impl); + core.setOutput('python-install-dir', installDir); return {impl: impl, version: versionFromPath(installDir)}; } @@ -150,6 +151,7 @@ async function useCpythonVersion( const installed = versionFromPath(installDir); core.setOutput('python-version', installed); + core.setOutput('python-install-dir', installDir); return {impl: 'CPython', version: installed}; }