]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Update building python package in build.yml
authorAlec Delaney <89490472+tekktrik@users.noreply.github.com>
Sat, 17 Sep 2022 02:59:47 +0000 (22:59 -0400)
committerAlec Delaney <89490472+tekktrik@users.noreply.github.com>
Sat, 17 Sep 2022 02:59:47 +0000 (22:59 -0400)
.github/workflows/build.yml

index c955ed0703b1ff4fdcb5b66a44cc7d56cdc77345..520228933fcc134b239db09bac6e22352c861e56 100644 (file)
@@ -47,3 +47,12 @@ jobs:
     - name: Build docs
       working-directory: docs
       run: sphinx-build -E -W -b html . _build/html
     - name: Build docs
       working-directory: docs
       run: sphinx-build -E -W -b html . _build/html
+    - name: Build Python package
+      if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
+      run: |
+        pip install --upgrade build twine
+        for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
+            sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
+        done;
+        python -m build
+        twine check dist/*