Add upload to PyPi github action
@@ -57,3 +57,17 @@ jobs:
uses: actions/upload-artifact@v2
with:
path: wheelhouse/*.whl
+
+ upload_pypi:
+ name: Upload to PyPI
+ needs: [sdist, wheels]
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: artifact
+ path: dist
+ - uses: pypa/gh-action-pypi-publish@master
+ with:
+ password: ${{ secrets.PYPI_API_TOKEN }}
