1818 tags :
1919 - " v*.*.*"
2020
21+ permissions : {}
2122jobs :
2223 build-pypi-distribs :
2324 name : Build and publish library to PyPI
2425 runs-on : ubuntu-24.04
2526
2627 steps :
27- - uses : actions/checkout@v4
28+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
29+ with :
30+ persist-credentials : false
2831 - name : Set up Python
29- uses : actions/setup-python@v5
32+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3033 with :
3134 python-version : 3.13
3235
4043 run : python -m twine check dist/*
4144
4245 - name : Upload built archives
43- uses : actions/upload-artifact@v4
46+ uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
4447 with :
4548 name : pypi_archives
4649 path : dist/*
@@ -57,13 +60,13 @@ jobs:
5760
5861 steps :
5962 - name : Download built archives
60- uses : actions/download-artifact@v4
63+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
6164 with :
6265 name : pypi_archives
6366 path : dist
6467
6568 - name : Create GH release
66- uses : softprops/action-gh-release@v2
69+ uses : softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
6770 with :
6871 draft : true
6972 files : dist/*
@@ -74,16 +77,17 @@ jobs:
7477 needs :
7578 - create-gh-release
7679 runs-on : ubuntu-24.04
80+ environment : pypi-publish
81+ permissions :
82+ id-token : write
7783
7884 steps :
7985 - name : Download built archives
80- uses : actions/download-artifact@v4
86+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
8187 with :
8288 name : pypi_archives
8389 path : dist
8490
8591 - name : Publish to PyPI
8692 if : startsWith(github.ref, 'refs/tags')
87- uses : pypa/gh-action-pypi-publish@release/v1
88- with :
89- password : ${{ secrets.PYPI_API_TOKEN }}
93+ uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
0 commit comments