Skip to content

Commit b9b380c

Browse files
authored
CI: fix twine upload (#961)
1 parent b89304c commit b9b380c

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/ci.yml

+14-8
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ jobs:
168168
if: ${{ !startsWith(matrix.os, 'ubuntu') || matrix.python-version != '3.9' }}
169169
run: pytest -s -v --junitxml=junit/test-results.xml tests
170170

171-
- name: Upload to PyPi
172-
if: startsWith(github.ref, 'refs/tags/')
173-
run: twine upload --skip-existing dist/*
174-
env:
175-
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
176-
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
177-
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"
178-
179171
- uses: ncipollo/release-action@v1
180172
if: startsWith(github.ref, 'refs/tags/')
181173
with:
@@ -185,3 +177,17 @@ jobs:
185177
generateReleaseNotes: true
186178
omitBodyDuringUpdate: true
187179
omitNameDuringUpdate: true
180+
181+
- name: Upload to PyPi
182+
if: startsWith(github.ref, 'refs/tags/')
183+
run: |
184+
if [[ $OS == ubuntu* ]]
185+
then
186+
twine upload --skip-existing dist/*
187+
else
188+
twine upload --skip-existing dist/*.whl
189+
fi
190+
env:
191+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
192+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
193+
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"

0 commit comments

Comments
 (0)