Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:

permissions:
contents: write
# Lets the runner mint the short-lived OIDC token that PyPI trusted publishing
# exchanges for an upload token. Without it the publish step has no credential
# at all, now that no API token is stored.
id-token: write

jobs:
deploy:
Expand Down Expand Up @@ -82,10 +86,10 @@ jobs:
run: git fetch
- name: push code to main
run: git push
# No password: the action falls back to trusted publishing, authenticating as
# this workflow in this repository against the publisher configured on PyPI.
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
# Tag and release only once PyPI has accepted the upload. A version cannot be
# re-uploaded to PyPI even after deletion, so the release must not advertise a
# version that never made it there.
Expand Down
Loading