twine-upload: replace notice with debug, simplify msgs

This commit is contained in:
William Woodruff 2023-12-04 20:27:16 -05:00
parent 2f6f737ca5
commit 674fb78567
No known key found for this signature in database
1 changed files with 3 additions and 7 deletions

View File

@ -56,15 +56,11 @@ https://docs.pypi.org/trusted-publishers"
if [[ "${INPUT_USER}" == "__token__" && -z "${INPUT_PASSWORD}" ]] ; then if [[ "${INPUT_USER}" == "__token__" && -z "${INPUT_PASSWORD}" ]] ; then
# No password supplied by the user implies that we're in the OIDC flow; # 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. # retrieve the OIDC credential and exchange it for a PyPI API token.
echo \ echo "::debug::Authenticating to ${INPUT_REPOSITORY_URL} via Trusted Publishing"
'::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'
INPUT_PASSWORD="$(python /app/oidc-exchange.py)" INPUT_PASSWORD="$(python /app/oidc-exchange.py)"
elif [[ "${INPUT_USER}" == '__token__' ]]; then elif [[ "${INPUT_USER}" == '__token__' ]]; then
echo \ echo \
'::notice::Using a user-provided API token for authentication' \ '::debug::Using a user-provided API token for authentication' \
"against ${INPUT_REPOSITORY_URL}" "against ${INPUT_REPOSITORY_URL}"
if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then
@ -72,7 +68,7 @@ elif [[ "${INPUT_USER}" == '__token__' ]]; then
fi fi
else else
echo \ echo \
'::notice::Using a username + password pair for authentication' \ '::debug::Using a username + password pair for authentication' \
"against ${INPUT_REPOSITORY_URL}" "against ${INPUT_REPOSITORY_URL}"
if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then