]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Update actions for pyproject.toml
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Wed, 18 Jun 2025 19:53:14 +0000 (12:53 -0700)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Wed, 18 Jun 2025 19:53:14 +0000 (12:53 -0700)
.github/workflows/build.yml
.github/workflows/release.yml

index 80940d0f12cfb7e33f6361f5734d25ead33f1585..8f6450abda107a9ae7ab0b849685f812d1afa5cd 100644 (file)
@@ -16,10 +16,10 @@ jobs:
     - name: Translate Repo Name For Build Tools filename_prefix
       id: repo-name
       run: echo "repo-name=Adafruit-Blinka" >> $GITHUB_OUTPUT
-    - name: Set up Python 3.8
+    - name: Set up Python 3.11
       uses: actions/setup-python@v4
       with:
-        python-version: 3.8
+        python-version: 3.11
     - name: Versions
       run: |
         python3 --version
@@ -47,6 +47,10 @@ jobs:
     - name: Build docs
       working-directory: docs
       run: sphinx-build -E -W -b html . _build/html
+    - name: Check For pyproject.toml
+      id: need-pypi
+      run: |
+        echo "pyproject-toml=$( find . -wholename './pyproject.toml' )" >> $GITHUB_OUTPUT
     - name: Build Python package
       run: |
         pip install --upgrade build twine
index a0eb8f585040b9b917433fced8551f7ff75c3f37..71f7c07a467fa32ff3ae6305d335d0a670cfc812 100644 (file)
@@ -12,22 +12,22 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v3
-    - name: Check For setup.py
+    - name: Check For pyproject.toml
       id: need-pypi
       run: |
-        echo "setup-py=$( find . -wholename './setup.py' )" >> $GITHUB_OUTPUT
+        echo "pyproject-toml=$( find . -wholename './pyproject.toml' )" >> $GITHUB_OUTPUT
     - name: Set up Python
-      if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
+      if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
       uses: actions/setup-python@v4
       with:
-        python-version: '3.x'
+        python-version: '3.11'
     - name: Install dependencies
-      if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
+      if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
       run: |
         python -m pip install --upgrade pip
         pip install --upgrade build twine
     - name: Build and publish
-      if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
+      if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
       env:
         TWINE_USERNAME: ${{ secrets.pypi_username }}
         TWINE_PASSWORD: ${{ secrets.pypi_password }}