fix: Handle existing version on Test PyPI gracefully

This commit is contained in:
UncleCode
2025-07-25 15:41:16 +08:00
parent 04258cd4f2
commit 4a1abd5086

View File

@@ -60,8 +60,15 @@ jobs:
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
echo "📦 Uploading to Test PyPI..."
twine upload --repository testpypi dist/*
echo "✅ Package uploaded to https://test.pypi.org/project/crawl4ai/"
twine upload --repository testpypi dist/* || {
if [ $? -eq 1 ]; then
echo "⚠️ Upload failed - likely version already exists on Test PyPI"
echo "Continuing anyway for test purposes..."
else
exit 1
fi
}
echo "✅ Test PyPI step complete"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3