mirror of
https://gitcode.com/gh_mirrors/gh/gh-action-pypi-publish.git
synced 2026-07-02 18:27:49 +00:00
feat: Add twine check before upload #30
This commit is contained in:
@@ -101,6 +101,15 @@ would now look like:
|
||||
packages_dir: custom-dir/
|
||||
```
|
||||
|
||||
### Disabling twine check
|
||||
|
||||
You can also disable the twine check with:
|
||||
|
||||
```yml
|
||||
with:
|
||||
check: false
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
The Dockerfile and associated scripts and documentation in this project
|
||||
|
||||
@@ -16,6 +16,10 @@ inputs:
|
||||
description: The target directory for distribution
|
||||
required: false
|
||||
default: dist
|
||||
check:
|
||||
description: Check before uploading
|
||||
required: false
|
||||
default: true
|
||||
branding:
|
||||
color: yellow
|
||||
icon: upload-cloud
|
||||
@@ -27,3 +31,4 @@ runs:
|
||||
- ${{ inputs.password }}
|
||||
- ${{ inputs.repository_url }}
|
||||
- ${{ inputs.packages_dir }}
|
||||
- ${{ inputs.check }}
|
||||
|
||||
@@ -28,6 +28,10 @@ then
|
||||
are in place should you face this problem.
|
||||
fi
|
||||
|
||||
if [[ ${INPUT_CHECK,,} != "false" ]] ; then
|
||||
exec twine check ${INPUT_PACKAGES_DIR%%/}/*
|
||||
fi
|
||||
|
||||
|
||||
TWINE_USERNAME="$INPUT_USER" \
|
||||
TWINE_PASSWORD="$INPUT_PASSWORD" \
|
||||
|
||||
Reference in New Issue
Block a user