ci(release): idempotent registry publish — survive re-tagged releases
apple / swift (push) Successful in 1m3s
ci / rust (push) Successful in 2m2s
ci / web (push) Successful in 56s
android / android (push) Successful in 3m22s
ci / docs-site (push) Successful in 58s
apple / screenshots (push) Successful in 5m38s
deb / build-publish (push) Successful in 3m12s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m41s
flatpak / build-publish (push) Successful in 4m8s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 9m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 9m12s
docker / deploy-docs (push) Successful in 19s
apple / swift (push) Successful in 1m3s
ci / rust (push) Successful in 2m2s
ci / web (push) Successful in 56s
android / android (push) Successful in 3m22s
ci / docs-site (push) Successful in 58s
apple / screenshots (push) Successful in 5m38s
deb / build-publish (push) Successful in 3m12s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m41s
flatpak / build-publish (push) Successful in 4m8s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 9m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 9m12s
docker / deploy-docs (push) Successful in 19s
A moved release tag re-fires the publish workflows, and the Gitea registries reject duplicate uploads with 409 (deb pool, rpm group, and the generic packages' versioned URLs; the channel aliases already pre-deleted). Delete any prior copy of the exact version before uploading (404 on first publish tolerated), so a republished tag overwrites instead of wedging — v0.5.0's retag left stale no-port-change artifacts published and every re-run red. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,14 @@ jobs:
|
||||
for rpm in dist/*.rpm; do
|
||||
case "$rpm" in *debuginfo*|*debugsource*) echo "skip $rpm"; continue;; esac
|
||||
echo "uploading $rpm"
|
||||
# A re-tagged release re-fires this workflow and the rpm registry 409s on duplicate
|
||||
# package versions — delete any prior copy of this exact name/version-release/arch
|
||||
# first (404 on the first publish is fine).
|
||||
NAME=$(rpm -qp --qf '%{NAME}' "$rpm" 2>/dev/null)
|
||||
VR=$(rpm -qp --qf '%{VERSION}-%{RELEASE}' "$rpm" 2>/dev/null)
|
||||
ARCH=$(rpm -qp --qf '%{ARCH}' "$rpm" 2>/dev/null)
|
||||
curl -fsS -o /dev/null --user "enricobuehler:$TOKEN" -X DELETE \
|
||||
"https://$REGISTRY/api/packages/$OWNER/rpm/$GROUP/package/$NAME/$VR/$ARCH" || true
|
||||
curl -fsS --user "enricobuehler:$TOKEN" --upload-file "$rpm" \
|
||||
"https://$REGISTRY/api/packages/$OWNER/rpm/$GROUP/upload"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user