From ae295504b3468d3952767fa0d25a4a2996a5578f Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 22 Mar 2023 10:41:35 -0400 Subject: [PATCH] twine-upload: increase detail on console notices Signed-off-by: William Woodruff Co-authored-by: Sviatoslav Sydorenko --- twine-upload.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/twine-upload.sh b/twine-upload.sh index b549b87..35722b0 100755 --- a/twine-upload.sh +++ b/twine-upload.sh @@ -43,8 +43,19 @@ INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')" 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::In OIDC flow" + echo \ + '::notice::Attempting to perform OIDC credential exchange ' \ + 'to retrieve a temporary short-lived API token for authentication ' \ + "against ${INPUT_REPOSITORY_URL}" INPUT_PASSWORD="$(python /app/oidc-exchange.py)" +elif [[ "${INPUT_USER}" == '__token__' ]]; then + echo \ + '::notice::Using a user-provided API token for authentication ' \ + "against ${INPUT_REPOSITORY_URL}" +else + echo \ + '::notice::Using a username + password pair for authentication ' \ + "against ${INPUT_REPOSITORY_URL}}" fi if [[