66 build-n-publish :
77 name : Deploy
88 runs-on : ubuntu-latest
9+ permissions :
10+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
11+
912 steps :
1013 - uses : actions/checkout@master
1114 # https://github.com/ansible/pylibssh/blob/1e7b17f/.github/workflows/build-test-n-publish.yml#L146-L151
@@ -15,10 +18,10 @@ jobs:
1518 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
1619 git describe --tags
1720 git describe --tags $(git rev-list --tags --max-count=1)
18- - name : Set up Python 3.9
21+ - name : Set up Python 3.11
1922 uses : actions/setup-python@v1
2023 with :
21- python-version : 3.9
24+ python-version : 3.11
2225 - name : Install pep517
2326 run : |
2427 python -m pip install build
@@ -36,15 +39,13 @@ jobs:
3639 # already exist, and thus fail.
3740 - name : Publish distribution 📦 to Test PyPI
3841 if : ${{ !contains(github.ref, 'main') }}
39- uses : pypa/gh-action-pypi-publish@master
42+ uses : pypa/gh-action-pypi-publish@release/v1
4043 with :
41- password : ${{ secrets.test_pypi_password }}
4244 repository_url : https://test.pypi.org/legacy/
4345 skip_existing : true
4446 # deploy to actual PyPI only when a tag is pushed to main
4547 - name : Publish distribution 📦 to PyPI
4648 if : startsWith(github.ref, 'refs/tags')
47- uses : pypa/gh-action-pypi-publish@master
49+ uses : pypa/gh-action-pypi-publish@release/v1
4850 with :
49- password : ${{ secrets.pypi_password }}
5051 skip_existing : true
0 commit comments