CI: Build and upload a PyPI package upon tagging
@@ -27,6 +27,25 @@ jobs:
- tox_env: docs
dnf_install: graphviz
+ pypi:
+ needs: build
+ if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
+ name: PyPI packaging
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-python@v2
+ name: Install Python
+ with:
+ python-version: '3.9'
+ - uses: casperdcl/deploy-pypi@bb869aafd89f657ceaafe9561d3b5584766c0f95
+ with:
+ password: ${{ secrets.PYPI_API_TOKEN }}
+ pip: wheel -w dist/ --no-deps .
+ upload: true
+
docker:
needs: build
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
