|
| 1 | +# Configure PyPI |
| 2 | + |
| 3 | +## Configure a trusted publisher |
| 4 | + |
| 5 | +Before a package can be published to [PyPI] after a release, a trusted |
| 6 | +publisher needs to be configured. |
| 7 | + |
| 8 | +!!! Note |
| 9 | + |
| 10 | + You need a [PyPI] account to do this. You can |
| 11 | + [register](https://pypi.org/account/register/) for free. |
| 12 | + |
| 13 | +1. [Log-in](https://pypi.org/account/login/) to [PyPI]. |
| 14 | + |
| 15 | +2. Go to the [Publishing](https://pypi.org/manage/account/publishing/) section |
| 16 | + of your account. |
| 17 | + |
| 18 | +3. Scroll down to the section **Add a new pending publisher**, and fill in the fields. |
| 19 | + |
| 20 | + * **PyPI Project Name:** The name of the package you want to publish. |
| 21 | + Usually is the same as the [GitHub] repository name, removing the `-python` |
| 22 | + suffix if any. |
| 23 | + |
| 24 | + * **Owner:** The [GitHub] username/organization of the owner of the package. |
| 25 | + For Frequenz projects this is `frequenz-floss`. |
| 26 | + |
| 27 | + * **Repository name:** The name of the [GitHub] repository of the package. |
| 28 | + |
| 29 | + * **Workflow name:** `ci.yaml`. |
| 30 | + |
| 31 | + * **Environment name:** Leave empty. |
| 32 | + |
| 33 | +4. Click on `Add`. |
| 34 | + |
| 35 | +5. Now uploading the new package from [GitHub] should work. |
| 36 | + |
| 37 | +6. After the new package was uploaded / created. |
| 38 | + |
| 39 | + 1. Invite other maintainers to co-maintain the new package. |
| 40 | + |
| 41 | + 1. Go to your account [Projects](https://pypi.org/manage/projects/). |
| 42 | + 2. Click on **Manage** for the new package. |
| 43 | + 3. Click on **Collaborators**. |
| 44 | + 4. Scroll down to the section **Invite collaborator**. |
| 45 | + 5. Fill in the **Username** and the appropriate **Role** for the new |
| 46 | + collaborator. |
| 47 | + 6. Click on **Add**. |
| 48 | + 7. Repeat steps to add more collaborators. |
| 49 | + |
| 50 | +[PyPI]: https://pypi.org/ |
| 51 | +[GitHub]: https://github.com/ |
0 commit comments