File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,15 @@ jobs:
2020 - name : mint API token
2121 id : mint-token
2222 run : |
23- oidc_token=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testpypi" | jq '.value')
24- api_token=$(curl -X POST https://test.pypi.org/_/oidc/github/mint-token -d "{\"token\": \"${oidc_token}\"}" | jq '.token' | tr -d '"')
25- echo "OIDC token: $oidc_token"
26- echo "pypi token: $api_token"
23+ resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
24+ "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testpypi")
25+ oidc_token=$(jq '.value' <<< "${resp}")
26+ resp=$(curl -X POST https://test.pypi.org/_/oidc/github/mint-token -d "{\"token\":${oidc_token}}")
27+ api_token=$(jq '.token' <<< "${resp}")
28+ api_token=$(echo ${api_token:1:-1})
29+ echo "response: ${resp}"
30+ echo "oidc token: $oidc_token"
31+ echo "api token: $api_token"
2732 echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
2833 - name : Python Semantic Release
2934 uses : relekang/python-semantic-release@v7.33.2
You can’t perform that action at this time.
0 commit comments