66 types : [published]
77 workflow_dispatch :
88
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+ cancel-in-progress : false
12+
13+ permissions : {}
14+
915env :
1016 DIST_DIR : dist/
1117
1218jobs :
1319 build-distributables :
20+ name : Build distributables
1421 # Why building is separate from publishing:
1522 # https://github.com/pypa/gh-action-pypi-publish/issues/217#issuecomment-1965727093
1623 runs-on : ubuntu-latest
2734 - name : Set pre-release version
2835 id : set-version
2936 if : startsWith(github.ref, 'refs/tags/') != true
37+ env :
38+ RUN_NUMBER : ${{ github.run_number }}
3039 run : |
3140 VERSION_BASE="$(uv version --short)"
32- RUN_NUMBER="${{ github.run_number }}"
3341 uv version --frozen "${VERSION_BASE}.dev${RUN_NUMBER}"
3442 - name : Get current version
3543 id : get-version
@@ -52,11 +60,12 @@ jobs:
5260 path : docs/_build/html
5361
5462 publish-pre-release :
63+ name : Publish pre-release to Test PyPI
5564 if : startsWith(github.ref, 'refs/tags/') == false
5665 needs : build-distributables
5766 runs-on : ubuntu-latest
5867 permissions :
59- id-token : write
68+ id-token : write # Required for OIDC-based trusted publishing to PyPI
6069 environment :
6170 name : splunk-test-pypi
6271 url : https://test.pypi.org/project/splunk-sdk/
@@ -72,11 +81,12 @@ jobs:
7281 repository-url : https://test.pypi.org/legacy/
7382
7483 publish-release :
84+ name : Publish release to PyPI
7585 if : startsWith(github.ref, 'refs/tags/') == true
7686 needs : build-distributables
7787 runs-on : ubuntu-latest
7888 permissions :
79- id-token : write
89+ id-token : write # Required for OIDC-based trusted publishing to PyPI
8090 environment :
8191 name : splunk-pypi
8292 url : https://pypi.org/project/splunk-sdk/
0 commit comments