@@ -51,6 +51,31 @@ Let's begin! 🚀
51
51
create it. It's not the same as a regular PyPI account.
52
52
53
53
54
+ Using trusted publishing
55
+ ------------------------
56
+
57
+ It is also possible to authenticate to PyPI without having to provide
58
+ an `API token `_. This can be done using
59
+ PyPI's `trusted publishing `_ implementation. This is recommended
60
+ also for security reasons, since the generated tokens are created for each of your projects
61
+ individually and expire automatically.
62
+
63
+ The following steps will lead you through creating a "pending" publisher.
64
+
65
+ 1. Go to https://pypi.org/manage/account/publishing/
66
+ 2. Now fill in the name you wish to publish your new project under,
67
+ your repository data and the name of the release workflow file
68
+ under the ``.github/ `` folder, see :ref: `workflow-definition `.
69
+ Finally add the name of the GitHub Actions environment
70
+ running under your repository.
71
+ Add the trusted publisher.
72
+ 3. Your "pending" publisher is no ready for its first use and will
73
+ create your project automatically once you use it
74
+ for the first time.
75
+
76
+
77
+ .. _workflow-definition :
78
+
54
79
Creating a workflow definition
55
80
==============================
56
81
@@ -150,3 +175,4 @@ sure that your release pipeline remains healthy!
150
175
https://github.com/marketplace/actions/pypi-publish
151
176
.. _Secrets :
152
177
https://docs.github.com/en/actions/reference/encrypted-secrets
178
+ .. _trusted publishing : https://docs.pypi.org/trusted-publishers/
0 commit comments