Skip to content

Commit 3d93bae

Browse files
authored
Merge pull request #14 from tekktrik/dev/python-version-arg
Allow CI Python version to be specified
2 parents eb96f94 + d1506ef commit 3d93bae

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

README.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,21 @@ It can be invoked using:
7878
with:
7979
pypi-username: ${{ secrets.pypi_username }}
8080
pypi-password: ${{ secrets.pypi_password }}
81+
82+
Notes
83+
-----
84+
85+
Libraries that will be available for use in CPython using Blinka may not be able to
86+
support the latest versions of CPython based on the availability of dependencies for
87+
that version. In these instances, all of the actions here support a input parameter
88+
of ``python-version`` to set the version of Python used by the CI (the default is to
89+
use the latest version):
90+
91+
.. code-block:: yaml
92+
93+
- name: Run PyPI Release CI workflow
94+
uses: adafruit/workflows-circuitpython-libs/release-pypi@main
95+
with:
96+
pypi-username: ${{ secrets.pypi_username }}
97+
pypi-password: ${{ secrets.pypi_password }}
98+
python-version: 3.9

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)