Skip to content

Commit 7a1a355

Browse files
committed
🎨 Show GH environments use in README examples
It is a useful protection feature giving the end-users more control over the release flow and trust.
1 parent 3b6670b commit 7a1a355

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
pypi-publish:
8787
name: Upload release to PyPI
8888
runs-on: ubuntu-latest
89+
environment:
90+
name: pypi
91+
url: https://pypi.org/p/<your-pypi-project-name>
8992
permissions:
9093
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
9194
steps:
@@ -103,6 +106,7 @@ Other indices that support trusted publishing can also be used, like TestPyPI:
103106
with:
104107
repository-url: https://test.pypi.org/legacy/
105108
```
109+
_(don't forget to update the environment name to `testpypi` or similar!)_
106110

107111
> **Pro tip**: only set the `id-token: write` permission in the job that does
108112
> publishing, not globally. Also, try to separate building from publishing

0 commit comments

Comments
 (0)