Skip to content

Commit 4986f64

Browse files
committed
attestations: actually ignore setting with non-TP or non-pypi index
1 parent 173b8fb commit 4986f64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

twine-upload.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ if [[ "${INPUT_ATTESTATIONS}" != "false" ]] ; then
6969
# user confusion, since attestations (currently) require Trusted Publishing.
7070
if [[ -n "${INPUT_PASSWORD}" ]] ; then
7171
echo "${ATTESTATIONS_WITHOUT_TP_WARNING}"
72+
INPUT_ATTESTATIONS="false"
7273
fi
7374

7475
# Setting `attestations: true` with an index other than PyPI or TestPyPI
7576
# indicates user confusion, since attestations are not supported on other
7677
# indices presently.
7778
if [[ ! "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]] ; then
7879
echo "${ATTESTATIONS_WRONG_INDEX_WARNING}"
80+
INPUT_ATTESTATIONS="false"
7981
fi
8082
fi
8183

0 commit comments

Comments
 (0)