Skip to content

Commit

Permalink
Update Release CI Pipeline to use PyPI's new trusted publishing
Browse files Browse the repository at this point in the history
Previously, we used the old GitHub secrets method
to publish to PyPI.
However, this method appears to be outdated.

Follwing [this guide], we update the .github
Release workflow

[this guide](https://docs.pypi.org/trusted-publishers/using-a-publisher/)
  • Loading branch information
s-heppner committed Mar 15, 2024
1 parent 978998c commit e9373da
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ on:

jobs:
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- uses: actions/checkout@v2
Expand All @@ -23,5 +28,3 @@ jobs:
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_ORG_TOKEN }}

0 comments on commit e9373da

Please sign in to comment.