Skip to content

Commit 4a95f4f

Browse files
committed
Allow CI Python version to be specified
1 parent eb96f94 commit 4a95f4f

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

build/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
name: 'Build CI'
66
description: 'Build CI used for pushes and pull requests'
7+
inputs:
8+
python-version:
9+
description: 'The version of Python to use in the CI'
10+
required: true
11+
default: '3.x'
712
runs:
813
using: "composite"
914
steps:
@@ -19,7 +24,7 @@ runs:
1924
- name: Set up Python 3.x
2025
uses: actions/setup-python@v4
2126
with:
22-
python-version: "3.x"
27+
python-version: ${{ inputs.python-version }}
2328
- name: Versions
2429
shell: bash
2530
run: |

release-gh/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
upload-url:
1212
description: 'The release upload URL for the asset'
1313
required: true
14+
python-version:
15+
description: 'The version of Python to use in the CI'
16+
required: true
17+
default: '3.x'
1418
runs:
1519
using: "composite"
1620
steps:
@@ -26,7 +30,7 @@ runs:
2630
- name: Set up Python 3.x
2731
uses: actions/setup-python@v4
2832
with:
29-
python-version: "3.x"
33+
python-version: ${{ inputs.python-version }}
3034
- name: Versions
3135
shell: bash
3236
run: |

release-pypi/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
pypi-password:
1212
description: 'The PyPI password for twine'
1313
required: true
14+
python-version:
15+
description: 'The version of Python to use in the CI'
16+
required: true
17+
default: '3.x'
1418
runs:
1519
using: "composite"
1620
steps:
@@ -24,7 +28,7 @@ runs:
2428
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
2529
uses: actions/setup-python@v4
2630
with:
27-
python-version: '3.x'
31+
python-version: ${{ inputs.python-version }}
2832
- name: Install dependencies
2933
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
3034
shell: bash

0 commit comments

Comments
 (0)