Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/versioning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
name: Publish to PyPI
if: (github.event.head_commit.message == 'Update package version')
runs-on: ubuntu-latest
# PyPI trusted publishing: uploads accepted only from this workflow in
# the pypi environment (limited to main). No stored token.
environment: pypi
permissions:
contents: write
id-token: write
Expand All @@ -74,8 +77,6 @@ jobs:
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip-existing: true
# After the upload, so a tag failure can never hold back a release.
# skip-existing above keeps a rerun safe.
Expand Down
1 change: 1 addition & 0 deletions changelog.d/trusted-publishing.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Publish to PyPI with trusted publishing (OIDC) instead of a stored API token.
Loading