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