Skip to content

Commit c37b99e

Browse files
committed
Merge PR #33
This change implements running dists verification before performing actual upload. It is controlled by the input called `verify_metadata` which is on by default.
2 parents 37e305e + 9bda1ca commit c37b99e

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ would now look like:
101101
packages_dir: custom-dir/
102102
```
103103

104+
### Disabling metadata verification
105+
106+
It is recommended that you run `twine check` just after producing your files,
107+
but this also runs `twine check` before upload. You can also disable the twine
108+
check with:
109+
110+
```yml
111+
with:
112+
verify_metadata: false
113+
```
114+
104115
## License
105116

106117
The Dockerfile and associated scripts and documentation in this project

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ inputs:
1616
description: The target directory for distribution
1717
required: false
1818
default: dist
19+
verify_metadata:
20+
description: Check metadata before uploading
21+
required: false
22+
default: true
1923
branding:
2024
color: yellow
2125
icon: upload-cloud
@@ -27,3 +31,4 @@ runs:
2731
- ${{ inputs.password }}
2832
- ${{ inputs.repository_url }}
2933
- ${{ inputs.packages_dir }}
34+
- ${{ inputs.verify_metadata }}

twine-upload.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ then
2828
are in place should you face this problem.
2929
fi
3030

31+
if [[ ${INPUT_VERIFY_METADATA,,} != "false" ]] ; then
32+
twine check ${INPUT_PACKAGES_DIR%%/}/*
33+
fi
34+
3135

3236
TWINE_USERNAME="$INPUT_USER" \
3337
TWINE_PASSWORD="$INPUT_PASSWORD" \

0 commit comments

Comments
 (0)