@@ -43,7 +43,8 @@ INPUT_ATTESTATIONS="$(get-normalized-input 'attestations')"
43
43
44
44
REPOSITORY_NAME=" $( echo ${GITHUB_REPOSITORY} | cut -d' /' -f2) "
45
45
WORKFLOW_FILENAME=" $( echo ${GITHUB_WORKFLOW_REF} | cut -d' /' -f5- | cut -d' @' -f1) "
46
- PACKAGE_NAME=" $( python /app/print-pkg-name.py ${INPUT_PACKAGES_DIR%%/ } ) "
46
+ PACKAGE_NAMES=()
47
+ while IFS=' ' read -r line; do PACKAGE_NAMES+=(" $line " ); done < <( python /app/print-pkg-names.py " ${INPUT_PACKAGES_DIR%%/ } " )
47
48
48
49
PASSWORD_DEPRECATION_NUDGE=" ::error title=Password-based uploads disabled::\
49
50
As of 2024, PyPI requires all users to enable Two-Factor \
@@ -68,18 +69,23 @@ The workflow was run with 'attestations: true' input, but the specified \
68
69
repository URL does not support PEP 740 attestations. As a result, the \
69
70
attestations input is ignored."
70
71
71
- if [[ ! " ${INPUT_REPOSITORY_URL} " =~ pypi\. org || -z " ${PACKAGE_NAME} " ]] ; then
72
+ if [[ ! " ${INPUT_REPOSITORY_URL} " =~ pypi\. org || ${ # PACKAGE_NAMES[@]} -eq 0 ]] ; then
72
73
TRUSTED_PUBLISHING_MAGIC_LINK_NUDGE=" "
73
74
else
74
75
if [[ " ${INPUT_REPOSITORY_URL} " =~ test\. pypi\. org ]] ; then
75
76
INDEX_URL=" https://test.pypi.org"
76
77
else
77
78
INDEX_URL=" https://pypi.org"
78
79
fi
80
+ ALL_LINKS=" "
81
+ for PACKAGE_NAME in " ${PACKAGE_NAMES[@]} " ; do
82
+ LINK=" ${INDEX_URL} /manage/project/${PACKAGE_NAME} /settings/publishing/?provider=github&owner=${GITHUB_REPOSITORY_OWNER} &repository=${REPOSITORY_NAME} &workflow_filename=${WORKFLOW_FILENAME} "
83
+ ALL_LINKS+=" $LINK " $' \n '
84
+ done
79
85
TRUSTED_PUBLISHING_MAGIC_LINK_NUDGE=" ::warning title=Create a Trusted Publisher::\
80
86
A new Trusted Publisher for the currently running publishing workflow can be created \
81
- by accessing the following link while logged-in as a maintainer of the package: \
82
- ${INDEX_URL} /manage/project/ ${PACKAGE_NAME} /settings/publishing/?provider=github&owner= ${GITHUB_REPOSITORY_OWNER} &repository= ${REPOSITORY_NAME} &workflow_filename= ${WORKFLOW_FILENAME }"
87
+ by accessing the following link(s) while logged-in as a maintainer of the package(s) : \"
88
+ ${ALL_LINKS } "
83
89
fi
84
90
85
91
[[ " ${INPUT_USER} " == " __token__" && -z " ${INPUT_PASSWORD} " ]] \
0 commit comments