Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix twine upload #961

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/"