File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,13 @@ jobs:
8585 echo "version=$VERSION" >> $GITHUB_OUTPUT
8686
8787 # Check if version already exists on PyPI
88- if curl -s "https://pypi.org/pypi/pytest-api-cov/$VERSION/json" > /dev/null 2>&1; then
88+ HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/pytest-api-cov/$VERSION/json")
89+ if [ "$HTTP_CODE" = "200" ]; then
8990 echo "exists=true" >> $GITHUB_OUTPUT
9091 echo "Version $VERSION already published to PyPI"
9192 else
9293 echo "exists=false" >> $GITHUB_OUTPUT
93- echo "Version $VERSION not found on PyPI"
94+ echo "Version $VERSION not found on PyPI (HTTP $HTTP_CODE) "
9495 fi
9596
9697 - name : Comment on publish workflow
Original file line number Diff line number Diff line change @@ -54,12 +54,13 @@ jobs:
5454 fi
5555
5656 # Check if version exists on PyPI
57- if curl -s "https://pypi.org/pypi/pytest-api-cov/$VERSION/json" > /dev/null 2>&1; then
57+ HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/pytest-api-cov/$VERSION/json")
58+ if [ "$HTTP_CODE" = "200" ]; then
5859 echo "pypi_exists=true" >> $GITHUB_OUTPUT
5960 echo "Version $VERSION already published to PyPI"
6061 else
6162 echo "pypi_exists=false" >> $GITHUB_OUTPUT
62- echo "Version $VERSION not found on PyPI"
63+ echo "Version $VERSION not found on PyPI (HTTP $HTTP_CODE) "
6364 fi
6465
6566 - name : Create version tag
You can’t perform that action at this time.
0 commit comments