2121jobs :
2222 build-pypi-distribs :
2323 name : Build and publish library to PyPI
24- runs-on : ubuntu-22.04
24+ runs-on : ubuntu-24.04
25+ permissions :
26+ contents : read
2527
2628 steps :
27- - uses : actions/checkout@master
29+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2830 - name : Set up Python
29- uses : actions/setup-python@v1
31+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3032 with :
3133 python-version : 3.12
3234
3739 run : python -m build --sdist --wheel --outdir dist/
3840
3941 - name : Upload built archives
40- uses : actions/upload-artifact@v4
42+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
4143 with :
4244 name : pypi_archives
4345 path : dist/*
@@ -47,37 +49,41 @@ jobs:
4749 name : Create GH release
4850 needs :
4951 - build-pypi-distribs
50- runs-on : ubuntu-22 .04
52+ runs-on : ubuntu-24 .04
5153
5254 steps :
5355 - name : Download built archives
54- uses : actions/download-artifact@v4
56+ uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
5557 with :
5658 name : pypi_archives
5759 path : dist
5860
5961 - name : Create GH release
60- uses : softprops/action-gh-release@v1
62+ uses : softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
6163 with :
62- draft : true
64+ draft : false
65+ generate_release_notes : true
6366 files : dist/*
6467
6568
6669 create-pypi-release :
6770 name : Create PyPI release
6871 needs :
6972 - create-gh-release
70- runs-on : ubuntu-22.04
73+ runs-on : ubuntu-24.04
74+ environment : pypi-publish
75+ permissions :
76+ id-token : write
7177
7278 steps :
7379 - name : Download built archives
74- uses : actions/download-artifact@v4
80+ uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
7581 with :
7682 name : pypi_archives
7783 path : dist
7884
7985 - name : Publish to PyPI
80- if : startsWith(github.ref, 'refs/tags')
81- uses : pypa/gh-action-pypi-publish@master
86+ if : startsWith(github.ref, 'refs/tags/ ')
87+ uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
8288 with :
83- password : ${{ secrets.PYPI_API_TOKEN }}
89+ verbose : true
0 commit comments