Skip to content

Commit

Permalink
Fixed pypi deployment workflow, split build and publish to two jobs, …
Browse files Browse the repository at this point in the history
…switched to pypi trusted publishing system for authentification
  • Loading branch information
llegregam committed Nov 2, 2023
1 parent 3d4a13c commit e9a228d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/pypi_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- v*

jobs:
build-n-publish:
build:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
Expand All @@ -29,7 +29,15 @@ jobs:
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
pypi-publish:
name: Publish distribution 📦 to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://https://pypi.org/project/IsoCor/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# retrieve your distributions here
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit e9a228d

Please sign in to comment.