File tree 1 file changed +8
-0
lines changed 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ INPUT_VERIFY_METADATA="$(get-normalized-input 'verify-metadata')"
40
40
INPUT_SKIP_EXISTING=" $( get-normalized-input ' skip-existing' ) "
41
41
INPUT_PRINT_HASH=" $( get-normalized-input ' print-hash' ) "
42
42
43
+ TRUSTED_PUBLISHING_NUDGE=" ::warning title=Upgrade to Trusted Publishing::\
44
+ Trusted Publishers allows publishing packages to PyPI from automated \
45
+ environments like GitHub Actions without needing to use username/password \
46
+ combinations or API tokens to authenticate with PyPI. Read more: \
47
+ https://docs.pypi.org/trusted-publishers"
48
+
43
49
if [[ " ${INPUT_USER} " == " __token__" && -z " ${INPUT_PASSWORD} " ]] ; then
44
50
# No password supplied by the user implies that we're in the OIDC flow;
45
51
# retrieve the OIDC credential and exchange it for a PyPI API token.
@@ -53,10 +59,12 @@ elif [[ "${INPUT_USER}" == '__token__' ]]; then
53
59
echo \
54
60
' ::notice::Using a user-provided API token for authentication' \
55
61
" against ${INPUT_REPOSITORY_URL} "
62
+ echo " ${TRUSTED_PUBLISHING_NUDGE} "
56
63
else
57
64
echo \
58
65
' ::notice::Using a username + password pair for authentication' \
59
66
" against ${INPUT_REPOSITORY_URL} "
67
+ echo " ${TRUSTED_PUBLISHING_NUDGE} "
60
68
fi
61
69
62
70
if [[
You can’t perform that action at this time.
0 commit comments