From d7c8f74842be9d8148fffcdb0311642421624ed7 Mon Sep 17 00:00:00 2001 From: "Watal M. Iwasaki" Date: Mon, 21 Nov 2022 20:49:52 +0900 Subject: [PATCH] Recommend both options to set Python version Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36160ff7..5b21c77b 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ steps: python-version: 'pypy3.9' - run: python my_script.py ``` -The `python-version` input is optional. If not supplied, the action will try to resolve the version from the default `.python-version` file. If the `.python-version` file doesn't exist Python or PyPy version from the PATH will be used. The default version of Python or PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always setting `python-version` explicitly. +The `python-version` input is optional. If not supplied, the action will try to resolve the version from the default `.python-version` file. If the `.python-version` file doesn't exist Python or PyPy version from the PATH will be used. The default version of Python or PyPy in PATH varies between runners and can be changed unexpectedly so we recommend always setting Python version explicitly using the `python-version` or `python-version-file` inputs. The action will first check the local [tool cache](docs/advanced-usage.md#hosted-tool-cache) for a [semver](https://github.com/npm/node-semver#versions) match. If unable to find a specific version in the tool cache, the action will attempt to download a version of Python from [GitHub Releases](https://github.com/actions/python-versions/releases) and for PyPy from the official [PyPy's dist](https://downloads.python.org/pypy/).