From ecf23d05075e19c8b6318fb3df7071291fbee791 Mon Sep 17 00:00:00 2001 From: cflmy Date: Fri, 27 Nov 2026 21:26:13 +0800 Subject: [PATCH] ci: leave tag protection review with the maintainer --- docs/ci.md | 11 ++++++----- tools/release/publish-gitea.py | 4 ---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/ci.md b/docs/ci.md index 6648f65..d13293b 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -55,12 +55,13 @@ python3 tools/release/publish-gitea.py --prepare \ --tag "$release_tag" --pipeline "$component_pipeline" --archive "$archive" ``` -The approved publisher runs the same command with `--body-file` in place of +The maintainer verifies Gitea tag protection as part of release approval. The +approved publisher runs the same command with `--body-file` in place of `--prepare` and a `GITEA_TOKEN` from the dedicated publisher account. The tool -requires applicable branch and tag protection, resumes matching drafts, verifies -the bytes on the forge and publishes only a complete inventory. A matching -public release is idempotent. A changed asset blocks the operation and needs a -new release decision. +checks the protected default branch and exact tag, resumes matching drafts, +verifies the bytes on the forge and publishes only a complete inventory. A +matching public release is idempotent. A changed asset blocks the operation and +needs a new release decision. ## Not gated by CI (explicit non-claims) diff --git a/tools/release/publish-gitea.py b/tools/release/publish-gitea.py index a3ca3e0..d8e6bf7 100755 --- a/tools/release/publish-gitea.py +++ b/tools/release/publish-gitea.py @@ -4,7 +4,6 @@ from __future__ import annotations import argparse -import fnmatch import hashlib import json import os @@ -136,9 +135,6 @@ def candidate(service, tag, pipeline, paths, *, publish): require(actor["login"] == "marqdo-publisher" and actor.get("is_admin") is False, "publication requires the non-admin publisher account") require(branch_info["protected"] is True, "default branch must be protected") - rules = service.json(f"/repos/{REPO}/tag_protections") - require(any(fnmatch.fnmatchcase(tag, rule["name_pattern"]) for rule in rules), - "tag requires an applicable protection rule") ci = ready_ci(service, head, pipeline, repository) archive = paths[0]