Skip to content

Commit 1cf95df

Browse files
committed
Update actions for pyproject.toml
1 parent cdd41be commit 1cf95df

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Translate Repo Name For Build Tools filename_prefix
1717
id: repo-name
1818
run: echo "repo-name=Adafruit-Blinka" >> $GITHUB_OUTPUT
19-
- name: Set up Python 3.8
19+
- name: Set up Python 3.11
2020
uses: actions/setup-python@v4
2121
with:
22-
python-version: 3.8
22+
python-version: 3.11
2323
- name: Versions
2424
run: |
2525
python3 --version
@@ -47,6 +47,10 @@ jobs:
4747
- name: Build docs
4848
working-directory: docs
4949
run: sphinx-build -E -W -b html . _build/html
50+
- name: Check For pyproject.toml
51+
id: need-pypi
52+
run: |
53+
echo "pyproject-toml=$( find . -wholename './pyproject.toml' )" >> $GITHUB_OUTPUT
5054
- name: Build Python package
5155
run: |
5256
pip install --upgrade build twine

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Check For setup.py
15+
- name: Check For pyproject.toml
1616
id: need-pypi
1717
run: |
18-
echo "setup-py=$( find . -wholename './setup.py' )" >> $GITHUB_OUTPUT
18+
echo "pyproject-toml=$( find . -wholename './pyproject.toml' )" >> $GITHUB_OUTPUT
1919
- name: Set up Python
20-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
20+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: '3.x'
23+
python-version: '3.11'
2424
- name: Install dependencies
25-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
25+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
2626
run: |
2727
python -m pip install --upgrade pip
2828
pip install --upgrade build twine
2929
- name: Build and publish
30-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
30+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
3131
env:
3232
TWINE_USERNAME: ${{ secrets.pypi_username }}
3333
TWINE_PASSWORD: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)