@@ -44,10 +44,11 @@ Let's begin! 🚀
4444 the name of the release workflow file under
4545 the ``.github/ `` folder, see :ref: `workflow-definition `.
4646 Finally add the name of the GitHub Actions environment
47- set up under your repository.
47+ (`` pypi ``) we're going set up under your repository.
4848 Register the trusted publisher.
49493. Now, go to https://test.pypi.org/manage/account/publishing/ and repeat
50- the second step.
50+ the second step, but now enter ``testpypi `` as the name of the
51+ GitHub Actions environment.
51524. Your "pending" publishers are now ready for their first use and will
5253 create your projects automatically once you use them
5354 for the first time.
@@ -76,6 +77,11 @@ should make GitHub run this workflow:
7677 :language: yaml
7778 :end-before: jobs:
7879
80+ This will also assure that the release workflow is only triggered
81+ if the current commit is tagged. It is recommended you use the
82+ latest release tag; a tool like GitHub's dependabot can keep
83+ these updated regularly.
84+
7985Checking out the project and building distributions
8086===================================================
8187
@@ -101,7 +107,7 @@ So add this to the steps list:
101107.. literalinclude :: github-actions-ci-cd-sample/publish-to-test-pypi.yml
102108 :language: yaml
103109 :start-after: version: "3.x"
104- :end-before: build-n- publish-pypi
110+ :end-before: publish-to -pypi
105111
106112Defining a workflow job environment
107113===================================
@@ -125,15 +131,12 @@ Finally, add the following steps at the end:
125131
126132.. literalinclude :: github-actions-ci-cd-sample/publish-to-test-pypi.yml
127133 :language: yaml
128- :lines: 39-47
134+ :lines: 41-48
129135
130136This step uses the `pypa/gh-action-pypi-publish `_ GitHub
131137Action: After the stored distribution package has been
132138downloaded by the `download-artifact `_ action, it uploads
133- the contents of the ``dist/ `` folder into PyPI unconditionally,
134- but only if the current commit is tagged. It is recommended you
135- use the latest release tag; a tool like GitHub's dependabot can keep
136- these updated regularly.
139+ the contents of the ``dist/ `` folder into PyPI unconditionally.
137140
138141Separate workflow for publishing to TestPyPI
139142============================================
0 commit comments