Releases: actions/setup-python
Add support to install multiple python versions
In scope of this release we added support to install multiple python versions. For this you can try to use this snippet:
- uses: actions/setup-python@v4
with:
python-version: |
3.8
3.9
3.10
Besides, we changed logic with throwing the error for GHES if cache is unavailable to warn (#566).
Improve error handling and messages
In scope of this release we added improved error message to put operating system and its version in the logs (#559). Besides, the release
- fixes issue about specifying architecture for pypy-nightly on Windows with related pull request.
- improves error handling for Http Errors (#511).
- updates minimatch (#558).
Update actions/core to 1.10.0 for v2
In scope of this release we update actions/core to 1.10.0 for v2 major tag: #533.
v4.3.0
Add check-latest input and bug fixes
In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, the version will then be downloaded from python-versions repository. By default check-latest is set to false. For PyPy it will to try to reach https://downloads.python.org/pypy/versions.json
Example of usage:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true
- run: python --version
Besides, it includes such changes as
v4.1.0
In scope of this pull request we updated actions/cache
package as the new version contains fixes for caching error handling. Moreover, we added a new input update-environment. This option allows to specify if the action shall update environment variables (default) or not.
Update-environment input
- name: setup-python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
update-environment: false
Besides, we added such changes as:
v4.0.0
What's Changed
- Support for
python-version-file
input: #336
Example of usage:
- uses: actions/setup-python@v4
with:
python-version-file: '.python-version' # Read python version from a file
- run: python my_script.py
There is no default python version for this setup-python
major version, the action requires to specify either python-version
input or python-version-file
input. If the python-version
input is not specified the action will try to read required version from file from python-version-file
input.
- Use pypyX.Y for PyPy
python-version
input: #349
Example of usage:
- uses: actions/setup-python@v4
with:
python-version: 'pypy3.9' # pypy-X.Y kept for backward compatibility
- run: python my_script.py
-
RUNNER_TOOL_CACHE
environment variable is equalAGENT_TOOLSDIRECTORY
: #338 -
Bugfix: create missing
pypyX.Y
symlinks: #347 -
PKG_CONFIG_PATH
environment variable: #400 -
Added
python-path
output: #405
python-path
output contains Python executable path. -
Updated
zeit/ncc
tovercel/ncc
package: #393 -
Bugfix: fixed output for prerelease version of poetry: #409
-
Made
pythonLocation
environment variable consistent for Python and PyPy: #418 -
Bugfix for
3.x-dev
syntax: #417
Update actions/cache version to 2.0.2
In scope of this release we updated actions/cache
package as the new version contains fixes related to GHES 3.5 (#382)
Add "cache-hit" output and fix "python-version" output for PyPy
This release introduces new output cache-hit (#373) and fix python-version output for PyPy (#365)
The cache-hit output contains boolean value indicating that an exact match was found for the key. It shows that the action uses already existing cache or not. The output is available only if cache is enabled.
The python-version contains version of Python or PyPy.
Support caching poetry dependencies and caching on GHES 3.5
- In the scope of this release, we added support for caching from GHES 3.5 and fixed the download issue for files > 2GB during restore.
- Caching poetry dependencies
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v3
with:
python-version: '3.9'
cache: 'poetry'
- run: poetry install
- run: poetry run pytest