Skip to content

Commit 37942ed

Browse files
Copilotgrst
andcommitted
Improve PyPI instructions in template_usage.md
Port improvements from scverse/cookiecutter-scverse-instance#207: - Clarify that tags need to be released (not just pushed) to trigger the workflow - Add note about pending publishers and first release - Use reference-style links per maintainer preference Closes #489 Agent-Logs-Url: https://github.com/scverse/cookiecutter-scverse/sessions/9c580dbc-9bdd-42a3-bf79-f2e539325f63 Co-authored-by: grst <7051479+grst@users.noreply.github.com>
1 parent 42e8b0f commit 37942ed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

{{cookiecutter.project_name}}/docs/template_usage.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ There you can see the execution history, logs, and (re-)trigger workflows manual
147147

148148
## Automating the PyPI release using GitHub actions
149149

150-
Tags adhering to `"*.*.*"` that are pushed to the `main` branch will trigger the release Github workflow that automatically builds and uploads the Python package to [PyPI][].
150+
Tags adhering to `"*.*.*"` that are pushed to the `main` branch and subsequently [released][github-releases] will trigger the release Github workflow that automatically builds and uploads the Python package to [PyPI][].
151151

152152
For this to work, you'll need to setup GitHub as a [trusted publisher][] on PyPI.
153153
To set this up, login to [PyPI][], and proceed depending on whether you already have your project on there or not:
@@ -159,6 +159,9 @@ The "Workflow name" needs to bet set to `release.yaml`.
159159
Set "Environment name" to “pypi” to match `environment: pypi` in `.github/workflows/release.yaml`.
160160
For more details, please refer to the official [PyPI guide for setting up trusted publishing][trusted publisher].
161161

162+
If you added a new pending publisher to set up your project, the project will be published only once you release your package for the first time (see above).
163+
164+
[github-releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases
162165
[pypi-trusted-publishing-guide]: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
163166

164167
[PyPI]: https://pypi.org/

0 commit comments

Comments
 (0)