Change dist param to packages-dir

This commit is contained in:
Sviatoslav Sydorenko 2019-12-06 13:38:52 +01:00
parent 4f4304928f
commit d7872a6165
No known key found for this signature in database
GPG key ID: 9345E8FEA89CA455
3 changed files with 7 additions and 7 deletions

View file

@ -98,7 +98,7 @@ would now look like:
with: with:
user: __token__ user: __token__
password: ${{ secrets.test_pypi_password }} password: ${{ secrets.test_pypi_password }}
dist: custom-dir/ packages-dir: custom-dir/
``` ```
## License ## License

View file

@ -12,7 +12,7 @@ inputs:
repository_url: repository_url:
description: The repository URL to use description: The repository URL to use
required: false required: false
dist: packages-dir:
description: The target directory for distribution description: The target directory for distribution
required: false required: false
default: dist default: dist
@ -26,4 +26,4 @@ runs:
- ${{ inputs.user }} - ${{ inputs.user }}
- ${{ inputs.password }} - ${{ inputs.password }}
- ${{ inputs.repository_url }} - ${{ inputs.repository_url }}
- ${{ inputs.dist }} - ${{ inputs.packages-dir }}

View file

@ -17,14 +17,14 @@ then
fi fi
if [[ if [[
! -d ${INPUT_DIST%%/}/ || ! -d ${INPUT_PACKAGES_DIR%%/}/ ||
"`ls -l ${INPUT_DIST%%/}/*.tar.gz ${INPUT_DIST%%/}/*.whl`" == "total 0" "`ls -l ${INPUT_PACKAGES_DIR%%/}/*.tar.gz ${INPUT_PACKAGES_DIR%%/}/*.whl`" == "total 0"
]] ]]
then then
>&2 echo \ >&2 echo \
[WARNING]: \ [WARNING]: \
It looks like there are no Python distribution packages to \ It looks like there are no Python distribution packages to \
publish in the directory '"${INPUT_DIST%%/}/"'. Please verify that they \ publish in the directory '"${INPUT_PACKAGES_DIR%%/}/"'. Please verify that they \
are in place should you face this problem. are in place should you face this problem.
fi fi
@ -32,4 +32,4 @@ fi
TWINE_USERNAME="$INPUT_USER" \ TWINE_USERNAME="$INPUT_USER" \
TWINE_PASSWORD="$INPUT_PASSWORD" \ TWINE_PASSWORD="$INPUT_PASSWORD" \
TWINE_REPOSITORY_URL="$INPUT_REPOSITORY_URL" \ TWINE_REPOSITORY_URL="$INPUT_REPOSITORY_URL" \
exec twine upload ${INPUT_DIST%%/}/* exec twine upload ${INPUT_PACKAGES_DIR%%/}/*