From cf69e2047c2569ee6520a3b8ecc39d58243bb6c5 Mon Sep 17 00:00:00 2001 From: Subin Modeel Date: Tue, 15 Sep 2020 00:31:21 -0400 Subject: [PATCH] Update twine-upload.sh --- README.md | 9 +++++++++ action.yml | 5 +++++ twine-upload.sh | 3 +++ 3 files changed, 17 insertions(+) diff --git a/README.md b/README.md index bc6722b..8f77549 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,15 @@ default) setting as follows: have steps for publishing to both PyPI and TestPyPI, consider only using it for the latter, having the former fail loudly on duplicates. +### For Debugging + +Sometimes, `twine upload` can fail and to debug use the `verbose` setting as follows: + +```yml + with: + verbose: true +``` + ## License The Dockerfile and associated scripts and documentation in this project diff --git a/action.yml b/action.yml index 1a25481..ebe6dfc 100644 --- a/action.yml +++ b/action.yml @@ -26,6 +26,10 @@ inputs: exists in the target package index required: false default: false + verbose: + description: Show verbose output. + required: false + default: false branding: color: yellow icon: upload-cloud @@ -39,3 +43,4 @@ runs: - ${{ inputs.packages_dir }} - ${{ inputs.verify_metadata }} - ${{ inputs.skip_existing }} + - ${{ inputs.verbose }} diff --git a/twine-upload.sh b/twine-upload.sh index f9df411..2aef181 100755 --- a/twine-upload.sh +++ b/twine-upload.sh @@ -40,6 +40,9 @@ if [[ ${INPUT_SKIP_EXISTING,,} != "false" ]] ; then TWINE_EXTRA_ARGS=--skip-existing fi +if [[ ${VERBOSE,,} != "false" ]] ; then + TWINE_EXTRA_ARGS="--verbose $TWINE_EXTRA_ARGS" +fi TWINE_USERNAME="$INPUT_USER" \ TWINE_PASSWORD="$INPUT_PASSWORD" \