Skip to content

Commit

Permalink
Add extra note to "Using PyPI's trusted publishing" section.
Browse files Browse the repository at this point in the history
Add extra note to "Using PyPI's trusted publishing" section to
solve issues publishing to PyPI when "Environment name" is set
on PyPI.

Based on: #1575 (comment)
  • Loading branch information
ghuls committed Feb 7, 2024
1 parent 8fb4e35 commit 0c391b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions guide/src/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,5 +300,6 @@ By default, the workflow provided by `generate-ci` will publish the release arti
To enable it, modify the `release` action in the generated GitHub workflow file:
- remove `MATURIN_PYPI_TOKEN` from the `env` section to make maturin use trusted publishing
- add `id-token: write` to the action's `permissions` (see [Configuring OpenID Connect in PyPI](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi) from GitHub's documentation).
- if `Environment name: release` was set in PyPI, add `environment: release`

Make sure to follow the steps listed in [PyPI's documentation](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) to set up your GitHub repository as a trusted publisher in the PyPI project settings before attempting to run the workflow.

0 comments on commit 0c391b9

Please sign in to comment.