Skip to content

Commit ea2b465

Browse files
jw9829henryiii
authored andcommitted
Recommend Trusted Publishing in tutorial
1 parent 277b5f8 commit ea2b465

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎source/tutorials/packaging-projects.rst‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,15 +495,19 @@ When you are ready to upload a real package to the Python Package Index you can
495495
do much the same as you did in this tutorial, but with these important
496496
differences:
497497

498+
For projects published through a supported CI/CD platform, we recommend
499+
:ref:`Trusted Publishing <trusted-publishing>` instead of storing a long-lived
500+
API token. The linked guide shows how to set this up with GitHub Actions.
501+
498502
* Choose a memorable and unique name for your package. You don't have to append
499503
your username as you did in the tutorial, but you can't use an existing name.
500504
* Register an account on https://pypi.org - note that these are two separate
501505
servers and the login details from the test server are not shared with the
502506
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.
507+
* For a manual upload, use ``twine upload dist/*`` to upload your package and
508+
enter your credentials for the account you registered on the real PyPI. Now
509+
that you're uploading the package in production, you don't need to specify
510+
``--repository``; the package will upload to https://pypi.org/ by default.
507511
* Install your package from the real PyPI using ``python3 -m pip install [your-package]``.
508512

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

0 commit comments

Comments
 (0)