Skip to content

Commit

Permalink
Merge PR #39
Browse files Browse the repository at this point in the history
This change exposes an extra GitHub Action input called `verbose`. It
allows to see `twine upload` detailed output if needed for debugging.
  • Loading branch information
webknjaz committed Sep 25, 2020
2 parents 1862321 + cf69e20 commit 1f0bcf2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,3 +43,4 @@ runs:
- ${{ inputs.packages_dir }}
- ${{ inputs.verify_metadata }}
- ${{ inputs.skip_existing }}
- ${{ inputs.verbose }}
3 changes: 3 additions & 0 deletions twine-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 1f0bcf2

Please sign in to comment.