Skip to content

Commit

Permalink
Change publish to pypi using TWINE directly on mac and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeyuXuAudio committed Oct 21, 2024
1 parent 15e300c commit 3b9d410
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,20 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://upload.pypi.org/legacy/
skip_existing: true
env:
TWINE_USERNAME: __token__ # OIDC uses __token__ for authentication
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} # OIDC token automatically provided

# Publish the binary distribution (bdist) to PyPI from non-Ubuntu systems
- name: Publish bdist to PyPI
# Publish to PyPI on macOS and Windows using Twine directly
- name: Publish to PyPI on macOS/Windows
if: github.event_name == 'release' && github.event.action == 'published' && matrix.os != 'ubuntu-latest'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://upload.pypi.org/legacy/
run: |
python -m pip install --upgrade twine # Ensure Twine is installed
twine upload --skip-existing dist/*
env:
TWINE_USERNAME: __token__ # OIDC uses __token__ for authentication
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

# - name: Clean up build artifacts
# run: |
Expand Down

0 comments on commit 3b9d410

Please sign in to comment.