Skip to content

Commit 62f01ae

Browse files
committed
GitHub Actions: twine upload via pypa/gh-action-pypi-publish
1 parent b48f453 commit 62f01ae

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,8 @@ jobs:
8585
artifacts/*.deb
8686
8787
- name: Create new PyPI release
88-
env:
89-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
90-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
91-
if: "startsWith(github.ref, 'refs/tags/') && (!(contains(github.ref, 'rc') || contains(github.ref, 'pre')))"
92-
run: |
93-
if [ "$TWINE_USERNAME" != '' -a "$TWINE_PASSWORD" != '' ]; then
94-
twine upload dist/*
95-
fi
88+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && (!(contains(github.ref, 'rc') || contains(github.ref, 'pre')))
89+
uses: pypa/gh-action-pypi-publish@master
90+
with:
91+
user: ${{ secrets.PYPI_USERNAME }}
92+
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)