GitHub Actions: twine upload via pypa/gh-action-pypi-publish

This commit is contained in:
Markus 2020-10-12 19:01:09 +02:00
parent b48f4532b9
commit 62f01aeff9
1 changed files with 5 additions and 8 deletions

View File

@ -85,11 +85,8 @@ jobs:
artifacts/*.deb
- name: Create new PyPI release
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
if: "startsWith(github.ref, 'refs/tags/') && (!(contains(github.ref, 'rc') || contains(github.ref, 'pre')))"
run: |
if [ "$TWINE_USERNAME" != '' -a "$TWINE_PASSWORD" != '' ]; then
twine upload dist/*
fi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && (!(contains(github.ref, 'rc') || contains(github.ref, 'pre')))
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}