Ask the PyPI index whether the version is there, since twine may not
build / build (push) Successful in 10m53s

twine's --skip-existing is not a client-side flag: it asks the repository
whether it supports the feature, and Gitea's PyPI registry does not advertise
it, so the upload fails with UnsupportedConfiguration before it starts. Check
the simple index for the version instead -- the same check-then-publish shape
the npm step already uses.
This commit is contained in:
max-voitcov
2026-08-26 11:18:04 +03:00
parent a0acdd1c82
commit 3dc5ebbbb9
+12 -1
View File
@@ -171,9 +171,20 @@ jobs:
run: |
python -m pip install --upgrade build twine
python -m build
python -m twine upload --skip-existing \
# twine's --skip-existing is refused outright here: it asks the
# repository whether it supports the feature and Gitea's PyPI
# registry does not advertise it ("UnsupportedConfiguration"). Ask
# the simple index instead, the same check-then-publish shape the
# npm step uses.
INDEX="https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/pypi/simple/pulumi-dokploy/"
if curl -sf --user "${GITEA_OWNER}:${TWINE_PASSWORD}" "$INDEX" \
| grep -qE "pulumi_dokploy-${VERSION}[-.]"; then
echo "pulumi-dokploy ${VERSION} is already published"
else
python -m twine upload \
--repository-url "https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/pypi" \
dist/*
fi
- name: Publish to the Gitea NuGet registry
working-directory: pulumi-dokploy/sdk/dotnet