Description
Description:
v4.1.0 introduced a regression where the repo-root .python-version
file is no longer used by default to select the python version to install.
The regression was introduced by #450
Reading from .python-version
when the python-version
input is unset is documented in action.yml
-
Lines 6 to 7 in 00a5248
Action version:
v4.1.0 (regression from v4.0.0)
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
N/A
Repro steps:
Create a repository with a .python-version
file containing 3.10.4
and a workflow containing a setup-python step, e.g.:
name: CI
on: [push]
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4.0.0
Expected behavior:
setup-python should install 3.10.4 as it is listed in the .python-version
file, i.e. the step logs:
Run actions/setup-python@v4
with:
token: ***
Resolved as 3.10.4
This is the behaviour with v4.0.0.
Actual behavior:
setup-python ignores the .python-version
file and logs:
Run actions/setup-python@v4
Warning: Neither 'python-version' nor 'python-version-file' inputs were supplied.
Warning: The `python-version` input is not set. The version of Python currently in `PATH` will be used.