Skip to content

Commit 1f4f317

Browse files
authored
Merge pull request #2140 from jw9829/recommend-trusted-publishing-1888
Recommend Trusted Publishing in the packaging tutorial
2 parents ccb2f90 + d350151 commit 1f4f317

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎source/tutorials/packaging-projects.rst‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,12 @@ PyPI, which isn't a permanent storage. The Test system occasionally deletes
491491
packages and accounts. It is best to use TestPyPI for testing and experiments
492492
like this tutorial.
493493

494+
.. tip::
495+
496+
For projects published through a supported CI/CD platform, we recommend
497+
:ref:`Trusted Publishing <trusted-publishing>` instead of storing a long-lived
498+
API token. The linked guide shows how to set this up with GitHub Actions.
499+
494500
When you are ready to upload a real package to the Python Package Index you can
495501
do much the same as you did in this tutorial, but with these important
496502
differences:
@@ -500,10 +506,10 @@ differences:
500506
* Register an account on https://pypi.org - note that these are two separate
501507
servers and the login details from the test server are not shared with the
502508
main server.
503-
* Use ``twine upload dist/*`` to upload your package and enter your credentials
504-
for the account you registered on the real PyPI. Now that you're uploading
505-
the package in production, you don't need to specify ``--repository``; the
506-
package will upload to https://pypi.org/ by default.
509+
* For a manual upload, use ``twine upload dist/*`` to upload your package and
510+
enter your credentials for the account you registered on the real PyPI. Now
511+
that you're uploading the package in production, you don't need to specify
512+
``--repository``; the package will upload to https://pypi.org/ by default.
507513
* Install your package from the real PyPI using ``python3 -m pip install [your-package]``.
508514

509515
At this point if you want to read more on packaging Python libraries here are

0 commit comments

Comments
 (0)