.github/workflows/cd.yaml #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
create: | |
tags: | |
- v* | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v5 | |
- uses: casperdcl/deploy-pypi@v2 | |
with: | |
password: ${{ secrets.PROD_PYPI }} | |
requirements: twine wheel | |
pip: wheel -w dist/ --no-deps . | |
# only upload if a tag is pushed (otherwise just build & check) | |
upload: ${{ github.event_name == 'create' && startsWith(github.event.ref, 'v') }} |