Skip to content

Commit

Permalink
Update pypi-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulero authored Oct 25, 2024
1 parent f6dfb35 commit ee29568
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pypi-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ jobs:
deploy_test_PyPI:
name: 📦 Deploy to TestPyPI
runs-on: ubuntu-22.04
needs: [build_wheels]
if: github.ref == 'refs/heads/main'
permissions:
id-token: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -54,16 +55,17 @@ jobs:
path: dist

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip-existing: true

deploy_PyPI:
name: 📦 Deploy to PyPI
runs-on: ubuntu-22.04
needs: [build_wheels]
if: startsWith(github.ref, 'refs/tags')
permissions:
id-token: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -72,6 +74,6 @@ jobs:
path: dist

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true

0 comments on commit ee29568

Please sign in to comment.