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
2525
2626 steps :
27- - uses : actions/checkout@master
27+ - uses : actions/checkout@v4
2828 - name : Set up Python
29- uses : actions/setup-python@v1
29+ uses : actions/setup-python@v5
3030 with :
3131 python-version : 3.12
3232
3737 run : python -m build --sdist --wheel --outdir dist/
3838
3939 - name : Upload built archives
40- uses : actions/upload-artifact@v4
40+ uses : actions/upload-artifact@v7
4141 with :
4242 name : pypi_archives
4343 path : dist/*
@@ -47,37 +47,39 @@ jobs:
4747 name : Create GH release
4848 needs :
4949 - build-pypi-distribs
50- runs-on : ubuntu-22 .04
50+ runs-on : ubuntu-24 .04
5151
5252 steps :
5353 - name : Download built archives
54- uses : actions/download-artifact@v4
54+ uses : actions/download-artifact@v8
5555 with :
5656 name : pypi_archives
5757 path : dist
5858
5959 - name : Create GH release
60- uses : softprops/action-gh-release@v1
60+ uses : softprops/action-gh-release@v2
6161 with :
62- draft : true
62+ draft : false
63+ generate_release_notes : true
6364 files : dist/*
6465
6566
6667 create-pypi-release :
6768 name : Create PyPI release
6869 needs :
6970 - create-gh-release
70- runs-on : ubuntu-22.04
71+ runs-on : ubuntu-24.04
72+ environment : pypi-publish
73+ permissions :
74+ id-token : write
7175
7276 steps :
7377 - name : Download built archives
74- uses : actions/download-artifact@v4
78+ uses : actions/download-artifact@v8
7579 with :
7680 name : pypi_archives
7781 path : dist
7882
7983 - name : Publish to PyPI
80- if : startsWith(github.ref, 'refs/tags')
81- uses : pypa/gh-action-pypi-publish@master
82- with :
83- password : ${{ secrets.PYPI_API_TOKEN }}
84+ if : startsWith(github.ref, 'refs/tags/')
85+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments