actions / setup-python

Set up your GitHub Actions workflow with a specific version of Python
MIT License
1.68k stars 538 forks source link

`python-version-file` does not support multiple versions #894

Open sdimovv opened 3 months ago

sdimovv commented 3 months ago

Description: It is possible to specify multiple python versions like so:

- uses: actions/setup-python@v5
  with:
    python-version: |
      3.8
      3.9
      3.10

However, specifying them like so breaks CI:

.python-version:

3.8
3.9
3.10
- uses: actions/setup-python@v5
   with:
     python-version-file: '.python-version'

Action version: 5

Platform:

Runner type:

Tools version:

Repro steps:
See description

Expected behavior: Multiple python versions can be read from .python-version

Actual behavior: Multiple python versions cannot be read from .python-version

aparnajyothi-y commented 3 months ago

Hello @sdimovv, Thank you for creating this issue and we will look into it :)

aparnajyothi-y commented 2 months ago

Hello @sdimovv, Thank you once again for creating this issue and as per the current implementation, the actions/setup-python action does not support reading multiple Python versions from a .python-version file. Instead, we should specify multiple versions directly in the yaml configuration under the python-version parameter like below as per this documentation.