Skip to content

Commit

Permalink
twine-upload: replace notice with debug, simplify msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
woodruffw committed Dec 5, 2023
1 parent 2f6f737 commit 674fb78
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions twine-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,19 @@ https://docs.pypi.org/trusted-publishers"
if [[ "${INPUT_USER}" == "__token__" && -z "${INPUT_PASSWORD}" ]] ; then
# No password supplied by the user implies that we're in the OIDC flow;
# retrieve the OIDC credential and exchange it for a PyPI API token.
echo \
'::notice::Attempting to perform trusted publishing exchange' \
'to retrieve a temporary short-lived API token for authentication' \
"against ${INPUT_REPOSITORY_URL} due to __token__ username with no" \
'supplied password field'
echo "::debug::Authenticating to ${INPUT_REPOSITORY_URL} via Trusted Publishing"
INPUT_PASSWORD="$(python /app/oidc-exchange.py)"
elif [[ "${INPUT_USER}" == '__token__' ]]; then
echo \
'::notice::Using a user-provided API token for authentication' \
'::debug::Using a user-provided API token for authentication' \
"against ${INPUT_REPOSITORY_URL}"

if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then
echo "${TRUSTED_PUBLISHING_NUDGE}"
fi
else
echo \
'::notice::Using a username + password pair for authentication' \
'::debug::Using a username + password pair for authentication' \
"against ${INPUT_REPOSITORY_URL}"

if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then
Expand Down

0 comments on commit 674fb78

Please sign in to comment.