File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 30
30
- name : Check if version exists on Test PyPI
31
31
id : version_check
32
32
run : |
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)"
33
+ if curl -s https://test.pypi.org/pypi/socketsecurity/$VERSION/json | grep -q '"version": "'$VERSION'"'; then
34
+ echo "Version ${VERSION} already exists on Test PyPI"
36
35
echo "exists=true" >> $GITHUB_OUTPUT
37
36
else
38
37
echo "Version ${VERSION} not found on Test PyPI"
@@ -100,14 +99,14 @@ jobs:
100
99
if : steps.version_check.outputs.exists != 'true'
101
100
id : verify_package
102
101
run : |
103
- # Wait for package to be available (try up to 5 times with 30s delay)
102
+ # Wait for package to be available (try up to 5 times with 10s delay)
104
103
for i in {1..5}; do
105
- if pip download --no-deps --dry-run --index-url https://test.pypi.org/simple/ " socketsecurity==${ VERSION}" 2>/dev/null ; then
104
+ if curl -s https://test.pypi.org/pypi/ socketsecurity/$ VERSION/json | grep -q '"version": "'$VERSION'"' ; then
106
105
echo "Package ${VERSION} is now available on Test PyPI"
107
106
exit 0
108
107
fi
109
- echo "Attempt $i: Package not yet available, waiting 30s ..."
110
- sleep 30
108
+ echo "Attempt $i: Package not yet available, waiting 10s ..."
109
+ sleep 10
111
110
done
112
111
echo "Package ${VERSION} not available after 5 attempts"
113
112
exit 1
You can’t perform that action at this time.
0 commit comments