Skip to content

Commit

Permalink
Add pypi trusted publisher
Browse files Browse the repository at this point in the history
Remove use of token, use Pypi OIDC from github.

closes #1331

Signed-off-by: Alexandre Lavigne <[email protected]>
  • Loading branch information
lavigne958 committed Mar 28, 2024
1 parent 29f1066 commit 186c457
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
environment: release
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -36,11 +39,6 @@ jobs:
- name: Publish to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 186c457

Please sign in to comment.