Skip to content

Commit 904aad3

Browse files
Copilotgrst
andauthored
Improve PyPI release instructions in template_usage.md (#490)
* Initial plan * 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> * Manual fixes --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: grst <7051479+grst@users.noreply.github.com> Co-authored-by: Gregor Sturm <gregor.sturm@boehringer-ingelheim.com>
1 parent 1da1d71 commit 904aad3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ 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+
Releases created via the [Github releases UI][github-releases]
151+
will trigger the release Github workflow that automatically builds and uploads the Python package to [PyPI][].
151152

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

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

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

0 commit comments

Comments
 (0)