Skip to content

Commit

Permalink
Fix the publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimes committed Dec 30, 2023
1 parent c2b5b32 commit 4bfb1a1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
with:
path: dist/*.tar.gz
publish:
if: github.event.inputs.repository != 'dummy'
name: 'Upload to PyPI/Test PyPI'
runs-on: ubuntu-22.04
needs: [build_wheels, build_sdist]
Expand All @@ -104,17 +105,17 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Publish
if: github.event.inputs.repository == 'pypi'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --repository ${{ github.event.inputs.repository }} dist/*
- name: 'Publish to TestPyPI'
if: github.event.inputs.repository == 'testpypi'
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload --repository ${{ github.event.inputs.repository }} dist/*
- name: Publish
if: github.event.inputs.repository == 'pypi'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --repository ${{ github.event.inputs.repository }} dist/*

0 comments on commit 4bfb1a1

Please sign in to comment.