From 3dc5ebbbb9caacdb4e593b8cddd61b7e4b711019 Mon Sep 17 00:00:00 2001 From: max-voitcov Date: Wed, 26 Aug 2026 11:18:04 +0300 Subject: [PATCH] Ask the PyPI index whether the version is there, since twine may not 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. --- .gitea/workflows/release.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index b03019b..f9d2364 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -171,9 +171,20 @@ jobs: run: | python -m pip install --upgrade build twine python -m build - python -m twine upload --skip-existing \ - --repository-url "https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/pypi" \ - dist/* + # 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