Skip to content

Commit 6eacfa6

Browse files
authored
Merge pull request #6 from peteryefi/dev
Updated pipeline to check package existence
2 parents c5dbacf + 4113936 commit 6eacfa6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ jobs:
4646
run: |
4747
python setup.py sdist bdist_wheel
4848
49+
- name: Check if version exists on PyPI
50+
run: |
51+
VERSION=$(python setup.py --version)
52+
if twine check dist/* | grep -q "This version already exists on PyPI"; then
53+
echo "Version $VERSION already exists on PyPI. Skipping upload."
54+
exit 0
55+
fi
56+
4957
- name: Upload package to PyPI
5058
env:
5159
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)