File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Open diff view settings
Original file line number Diff line number Diff line change 77
88jobs :
99 release :
10- if : github.repository == 'python-gitlab /python-gitlab'
10+ if : github.repository == 'nejch /python-gitlab' # testing via test.pypi.org first
1111 runs-on : ubuntu-latest
12+ environment : test.pypi.org # testing via test.pypi.org first
1213 steps :
1314 - uses : actions/checkout@v3.5.0
1415 with :
1516 fetch-depth : 0
1617 token : ${{ secrets.RELEASE_GITHUB_TOKEN }}
18+ - name : mint API token
19+ id : mint-token
20+ run : |
21+ oidc_token=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testpypi" | jq '.value')
22+ api_token=$(curl -X POST https://test.pypi.org/_/oidc/github/mint-token -d "{\"token\": \"${oidc_token}\"}" | jq '.token')
23+ echo "::add-mask::${api_token}"
24+ echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
1725 - name : Python Semantic Release
1826 uses : relekang/python-semantic-release@v7.33.2
1927 with :
2028 github_token : ${{ secrets.RELEASE_GITHUB_TOKEN }}
21- pypi_token : ${{ secrets.PYPI_TOKEN }}
29+ pypi_token : ${{ steps.mint-token.outputs.api-token }}
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ branch = "main"
3030version_variable = " gitlab/_version.py:__version__"
3131commit_subject = " chore: release v{version}"
3232commit_message = " "
33+ repository = " testpypi" # testing via test.pypi.org first
3334
3435[tool .pylint .messages_control ]
3536max-line-length = 88
You can’t perform that action at this time.
0 commit comments