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 :
31- python-version : 3.12
34+ python-version : 3.13
3235
3336 - name : Install pypa/build and twine
3437 run : python -m pip install --user --upgrade build twine pkginfo
3538
3639 - name : Build a binary wheel and a source tarball
3740 run : python -m build --wheel --sdist --outdir dist/
3841
39- - name : Validate wheel and sdis for Pypi
42+ - name : Validate wheels and sdists for Pypi
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/*
4750
4851
4952 create-gh-release :
53+ # Sets permissions of the GITHUB_TOKEN to allow release upload
54+ permissions :
55+ contents : write
5056 name : Create GH release
5157 needs :
5258 - build-pypi-distribs
5359 runs-on : ubuntu-24.04
5460
5561 steps :
5662 - name : Download built archives
57- uses : actions/download-artifact@v4
63+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
5864 with :
5965 name : pypi_archives
6066 path : dist
6167
6268 - name : Create GH release
63- uses : softprops/action-gh-release@v2
69+ uses : softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
6470 with :
6571 draft : true
6672 files : dist/*
@@ -77,11 +83,11 @@ jobs:
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
93+ uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
0 commit comments