Skip to content

Allow CI Python version to be specified #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,21 @@ It can be invoked using:
with:
pypi-username: ${{ secrets.pypi_username }}
pypi-password: ${{ secrets.pypi_password }}

Notes
-----

Libraries that will be available for use in CPython using Blinka may not be able to
support the latest versions of CPython based on the availability of dependencies for
that version. In these instances, all of the actions here support a input parameter
of ``python-version`` to set the version of Python used by the CI (the default is to
use the latest version):

.. code-block:: yaml

- name: Run PyPI Release CI workflow
uses: adafruit/workflows-circuitpython-libs/release-pypi@main
with:
pypi-username: ${{ secrets.pypi_username }}
pypi-password: ${{ secrets.pypi_password }}
python-version: 3.9
7 changes: 6 additions & 1 deletion build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

name: 'Build CI'
description: 'Build CI used for pushes and pull requests'
inputs:
python-version:
description: 'The version of Python to use in the CI'
required: true
default: '3.x'
runs:
using: "composite"
steps:
Expand All @@ -19,7 +24,7 @@ runs:
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: ${{ inputs.python-version }}
- name: Versions
shell: bash
run: |
Expand Down
6 changes: 5 additions & 1 deletion release-gh/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
upload-url:
description: 'The release upload URL for the asset'
required: true
python-version:
description: 'The version of Python to use in the CI'
required: true
default: '3.x'
runs:
using: "composite"
steps:
Expand All @@ -26,7 +30,7 @@ runs:
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: ${{ inputs.python-version }}
- name: Versions
shell: bash
run: |
Expand Down
6 changes: 5 additions & 1 deletion release-pypi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
pypi-password:
description: 'The PyPI password for twine'
required: true
python-version:
description: 'The version of Python to use in the CI'
required: true
default: '3.x'
runs:
using: "composite"
steps:
Expand All @@ -24,7 +28,7 @@ runs:
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: ${{ inputs.python-version }}
- name: Install dependencies
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
shell: bash
Expand Down