pypi-publish/twine-upload.sh

24 lines
638 B
Bash
Raw Normal View History

2019-08-23 07:13:19 -04:00
#! /usr/bin/env bash
set -Eeuo pipefail
if [[
"$INPUT_USER" == "__token__" &&
! "$INPUT_PASSWORD" =~ ^pypi-
]]
then
>&2 echo \
[WARNING]: \
It looks like you are trying to use an API token to \
authenticate in the package index and your token value does \
not start with '"pypi-"' as it typically should. This may \
cause an authentication error. Please verify that you have \
copied your token properly if such an error occurs.
fi
2019-08-23 07:17:10 -04:00
TWINE_USERNAME="$INPUT_USER" \
TWINE_PASSWORD="$INPUT_PASSWORD" \
TWINE_REPOSITORY_URL="$INPUT_REPOSITORY_URL" \
exec twine upload dist/*