Skip to content

Commit

Permalink
Fix upload to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
noscode committed Sep 20, 2023
1 parent 0866d91 commit aa0e378
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/publication_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: github.repository_owner == 'ctlab'
needs:
- build
runs-on: ubuntu-20.04
Expand All @@ -74,11 +75,30 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
if: github.repository_owner == 'ctlab'

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: github.repository_owner == 'ctlab' && github.event.release
needs:
- build
runs-on: ubuntu-20.04

environment:
name: publish-pypi
url: https://pypi.org/p/gadma

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to PyPI
if: github.repository_owner == 'ctlab' && github.event.release
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
repository-url: https://pypi.org/legacy/

0 comments on commit aa0e378

Please sign in to comment.