@@ -128,9 +128,36 @@ jobs:
128128 - name : List downloaded artifacts
129129 run : ls -R bindings/python/dist
130130 - name : Publish to TestPyPI
131+ id : publish-testpypi
132+ continue-on-error : true
131133 uses : pypa/gh-action-pypi-publish@release/v1
132134 with :
133135 repository-url : https://test.pypi.org/legacy/
134136 skip-existing : true
135137 packages-dir : bindings/python/dist
136138 verbose : true
139+ - name : Display error message on publish failure
140+ if : steps.publish-testpypi.outcome == 'failure'
141+ run : |
142+ echo "::error::Failed to publish to TestPyPI"
143+ echo ""
144+ echo "⚠️ TestPyPI Publish Failed"
145+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
146+ echo ""
147+ echo "This may be due to TestPyPI storage limits."
148+ echo "See: https://docs.pypi.org/project-management/storage-limits"
149+ echo ""
150+ echo "To resolve this issue, use the pypi-cleanup utility to clean up old TestPyPI artifacts:"
151+ echo "https://pypi.org/project/pypi-cleanup/"
152+ echo ""
153+ echo " uvx pypi-cleanup --package pyiceberg-core --host https://test.pypi.org/ \\"
154+ echo " --verbose -d 10 --do-it --username <username>"
155+ echo ""
156+ echo "Requirements:"
157+ echo " • Must be a maintainer for pyiceberg-core on TestPyPI"
158+ echo " (https://test.pypi.org/project/pyiceberg-core)"
159+ echo " • Requires TestPyPI password and 2FA"
160+ echo " • ⚠️ ONLY do this for TestPyPI, NOT for production PyPI!"
161+ echo ""
162+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
163+ exit 1
0 commit comments