run deploy pipeline only if tag

This commit is contained in:
Federico Galatolo
2021-04-24 14:31:14 +02:00
parent 3e641fa3dc
commit f4ed7b1b00

View File

@ -4,6 +4,7 @@ on: push
jobs:
build-n-publish:
name: Build and publish to PyPI
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
@ -16,7 +17,6 @@ jobs:
- name: Build binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}