devops: change PyPI push using shell script in main.yml
@@ -59,13 +59,11 @@ if [ $ACTION = "push-test" ]; then
echo "Pushing to PyPI..."
echo "******************************"
## Get HTTP response code, if already exists then response is 200
-# STATUS=$(curl -s --head -w %{http_code} https://test.pypi.org/project/pycellbase/$VERSION/ -o /dev/null)
-# if [ $STATUS = "200" ]; then
-# echo "Version $VERSION already exists in test PyPI!"
-# else
-# python3 -m pip install --user --upgrade twine
-# python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
-# fi
+ STATUS=$(curl -s --head -w %{http_code} https://test.pypi.org/project/pycellbase/$VERSION/ -o /dev/null)
+ if [ $STATUS = "200" ]; then
+ echo "Version $VERSION already exists in test PyPI!"
+ else
python3 -m pip install --user --upgrade twine
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
fi
+fi
