From 4a1abd508666b971ec9c47ac9a9bcc0f37a12fe8 Mon Sep 17 00:00:00 2001 From: UncleCode Date: Fri, 25 Jul 2025 15:41:16 +0800 Subject: [PATCH] fix: Handle existing version on Test PyPI gracefully --- .github/workflows/test-release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 78b56754..40f9ecbc 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -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