]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - .github/workflows/release.yml
Fix build missing in release CI
[Adafruit_Blinka-hackapet.git] / .github / workflows / release.yml
index 220e398e34de24d56a97bf359af1acb40c0c53dd..f8399b734d73a7fbc4a6001ab52bd666d7c1f2ba 100644 (file)
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
+#
+# SPDX-License-Identifier: Unlicense
 name: Release Actions
 
 on:
@@ -22,12 +25,15 @@ jobs:
       if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
       run: |
         python -m pip install --upgrade pip
-        pip install setuptools wheel twine
+        pip install --upgrade build twine
     - name: Build and publish
       if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
       env:
         TWINE_USERNAME: ${{ secrets.pypi_username }}
         TWINE_PASSWORD: ${{ secrets.pypi_password }}
       run: |
-        python setup.py sdist
+        for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
+            sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file;
+        done;
+        python -m build
         twine upload dist/*