Skip to content

Commit 12976ab

Browse files
committed
better version checking
1 parent dc440a1 commit 12976ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pr-preview.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ jobs:
3030
- name: Check if version exists on Test PyPI
3131
id: version_check
3232
run: |
33-
if pip index versions --index-url https://test.pypi.org/simple/ socketsecurity | grep -q "${VERSION}"; then
34-
echo "Version ${VERSION} already exists on Test PyPI"
33+
# Try both exact version check and pip install dry-run
34+
if pip download --no-deps --dry-run --index-url https://test.pypi.org/simple/ "socketsecurity==${VERSION}" 2>/dev/null; then
35+
echo "Version ${VERSION} already exists on Test PyPI (found via pip download)"
3536
echo "exists=true" >> $GITHUB_OUTPUT
3637
else
3738
echo "Version ${VERSION} not found on Test PyPI"

0 commit comments

Comments
 (0)