@@ -42,7 +42,8 @@ INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')"
42
42
43
43
REPOSITORY_NAME=" $( echo ${GITHUB_REPOSITORY} | cut -d' /' -f2) "
44
44
WORKFLOW_FILENAME=" $( echo ${GITHUB_WORKFLOW_REF} | cut -d' /' -f5- | cut -d' @' -f1) "
45
- PACKAGE_NAME=" $( python /app/print-pkg-name.py ${INPUT_PACKAGES_DIR%%/ } ) "
45
+ PACKAGE_NAMES=()
46
+ while IFS=' ' read -r line; do PACKAGE_NAMES+=(" $line " ); done < <( python /app/print-pkg-names.py " ${INPUT_PACKAGES_DIR%%/ } " )
46
47
47
48
PASSWORD_DEPRECATION_NUDGE=" ::error title=Password-based uploads disabled::\
48
49
As of 2024, PyPI requires all users to enable Two-Factor \
@@ -58,18 +59,23 @@ combinations or API tokens to authenticate with PyPI. Read more: \
58
59
https://docs.pypi.org/trusted-publishers"
59
60
60
61
61
- if [[ ! " ${INPUT_REPOSITORY_URL} " =~ pypi\. org || -z " ${PACKAGE_NAME} " ]] ; then
62
+ if [[ ! " ${INPUT_REPOSITORY_URL} " =~ pypi\. org || ${ # PACKAGE_NAMES[@]} -eq 0 ]] ; then
62
63
TRUSTED_PUBLISHING_MAGIC_LINK_NUDGE=" "
63
64
else
64
65
if [[ " ${INPUT_REPOSITORY_URL} " =~ test\. pypi\. org ]] ; then
65
66
INDEX_URL=" https://test.pypi.org"
66
67
else
67
68
INDEX_URL=" https://pypi.org"
68
69
fi
70
+ ALL_LINKS=" "
71
+ for PACKAGE_NAME in " ${PACKAGE_NAMES[@]} " ; do
72
+ LINK=" ${INDEX_URL} /manage/project/${PACKAGE_NAME} /settings/publishing/?provider=github&owner=${GITHUB_REPOSITORY_OWNER} &repository=${REPOSITORY_NAME} &workflow_filename=${WORKFLOW_FILENAME} "
73
+ ALL_LINKS+=" $LINK " $' \n '
74
+ done
69
75
TRUSTED_PUBLISHING_MAGIC_LINK_NUDGE=" ::warning title=Create a Trusted Publisher::\
70
76
A new Trusted Publisher for the currently running publishing workflow can be created \
71
- by accessing the following link while logged-in as a maintainer of the package: \
72
- ${INDEX_URL} /manage/project/ ${PACKAGE_NAME} /settings/publishing/?provider=github&owner= ${GITHUB_REPOSITORY_OWNER} &repository= ${REPOSITORY_NAME} &workflow_filename= ${WORKFLOW_FILENAME }"
77
+ by accessing the following link(s) while logged-in as a maintainer of the package(s) : \"
78
+ ${ALL_LINKS } "
73
79
fi
74
80
75
81
if [[ " ${INPUT_USER} " == " __token__" && -z " ${INPUT_PASSWORD} " ]] ; then
0 commit comments