Skip to content

Commit

Permalink
Improve publishing to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
ml31415 committed Apr 19, 2024
1 parent cbdf35c commit 5ce1580
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
python -m twine check --strict dist/*
pwd
if [ -f dist/numpy-groupies-0.0.0.tar.gz ]; then
if [ -f dist/numpy_groupies-0.0.0.tar.gz ]; then
echo "❌ INVALID VERSION NUMBER"
exit 1
else
Expand Down Expand Up @@ -64,16 +64,14 @@ jobs:
if: github.event_name == 'push'
run: |
python -m pip install --upgrade pip
python -m pip install dist/numpy-groupies*.tar.gz
python -m pip install dist/*.tar.gz
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/
verbose: true

skip-existing: true

upload-to-pypi:
needs: test-built-dist
Expand All @@ -87,6 +85,5 @@ jobs:
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
skip-existing: true

0 comments on commit 5ce1580

Please sign in to comment.