Skip to content

Commit 267202b

Browse files
committed
twine-upload: only do OIDC flow when user is token
Signed-off-by: William Woodruff <[email protected]>
1 parent 6e6376d commit 267202b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twine-upload.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ INPUT_VERIFY_METADATA="$(get-normalized-input 'verify-metadata')"
3939
INPUT_SKIP_EXISTING="$(get-normalized-input 'skip-existing')"
4040
INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')"
4141

42-
if [[ -z "${INPUT_PASSWORD}" ]] ; then
42+
if [[ "${INPUT_USER}" == "__token__" && -z "${INPUT_PASSWORD}" ]] ; then
4343
# No password supplied by the user implies that we're in the OIDC flow;
4444
# retrieve the OIDC credential and exchange it for a PyPI API token.
4545
echo "::notice::in OIDC flow"

0 commit comments

Comments
 (0)