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,17 +47,17 @@ 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 :
6262 draft : true
6363 files : dist/*
@@ -67,17 +67,18 @@ jobs:
6767 name : Create PyPI release
6868 needs :
6969 - create-gh-release
70- runs-on : ubuntu-22.04
70+ runs-on : ubuntu-24.04
71+ environment : pypi-publish
72+ permissions :
73+ id-token : write
7174
7275 steps :
7376 - name : Download built archives
74- uses : actions/download-artifact@v4
77+ uses : actions/download-artifact@v8
7578 with :
7679 name : pypi_archives
7780 path : dist
7881
7982 - 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 }}
83+ if : startsWith(github.ref, 'refs/tags/')
84+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments