Skip to content

Commit

Permalink
CI: fix twine upload (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopohl authored Mar 1, 2022
1 parent b89304c commit b9b380c
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ jobs:
if: ${{ !startsWith(matrix.os, 'ubuntu') || matrix.python-version != '3.9' }}
run: pytest -s -v --junitxml=junit/test-results.xml tests

- name: Upload to PyPi
if: startsWith(github.ref, 'refs/tags/')
run: twine upload --skip-existing dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"

- uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
Expand All @@ -185,3 +177,17 @@ jobs:
generateReleaseNotes: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true

- name: Upload to PyPi
if: startsWith(github.ref, 'refs/tags/')
run: |
if [[ $OS == ubuntu* ]]
then
twine upload --skip-existing dist/*
else
twine upload --skip-existing dist/*.whl
fi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"

0 comments on commit b9b380c

Please sign in to comment.