X Tutup
Skip to content

Commit 8442466

Browse files
authored
Merge pull request #12 from nejch/oidc-release
fix(ci): clean up release script
2 parents a237f8b + 57f1e3a commit 8442466

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ jobs:
2020
- name: mint API token
2121
id: mint-token
2222
run: |
23-
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
24-
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testpypi")
23+
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=testpypi")
2524
oidc_token=$(jq '.value' <<< "${resp}")
25+
2626
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"
27+
api_token=$(jq '.token' <<< "${resp}" | tr -d '"')
28+
29+
echo "::add-mask::${api_token}"
3230
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
3331
- name: Python Semantic Release
3432
uses: relekang/python-semantic-release@v7.33.2

0 commit comments

Comments
 (0)
X Tutup