From 6578bf80a7784d70f75fb8d06997ba3186fa6779 Mon Sep 17 00:00:00 2001 From: cflmy Date: Wed, 2 Dec 2026 23:18:47 +0800 Subject: [PATCH] ci: add the protected component release lane (marqdo#96 M1) Wire the single ecosystem release implementation into this repository: the ordinary lane keeps real CLI tests and adds a deterministic packaging self-check through the pinned root commit/sha256, and a tag-only protected lane publishes an immutable Gitea Release with release-evidence.json. The root repository no longer builds (marqdo#102). --- .woodpecker/ci.yml | 28 ++++++++++++++++++++++++++-- .woodpecker/publish.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 .woodpecker/publish.yml diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index e38ddcf..fb79037 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -2,12 +2,36 @@ # # The published `marqdo-ci-shell` image is the only runtime dependency: one # Ubuntu 24.04 base, the released CLI/Bundle, and common test tools. No image -# variance, apt install, Rust toolchain download, CLI rebuild or sibling checkout. +# variance, apt install, Rust toolchain download or sibling checkout. when: - event: [push, pull_request, manual] + - event: [pull_request, manual] + - event: push + branch: main steps: test: image: git.cflmy.cn/cflmy/marqdo-ci-shell:3.0.0-rc.6 commands: - sh scripts/test.sh + + package: + # Deterministic packaging self-check through the single ecosystem release + # implementation (marqdo#96 M1). The root repository no longer builds + # (marqdo#102); this component lane is the release verification. Ordinary + # push/PR receives no publish token and produces no release. + image: git.cflmy.cn/cflmy/marqdo-ci-shell:3.0.0-rc.6 + depends_on: [test] + commands: + - | + set -eu + kit=$(mktemp -d) + trap 'rm -rf "$kit"' EXIT + base="https://git.cflmy.cn/cflmy/marqdo/raw/commit/c367d1df3ebdaa08578ea304d50bb9419bef16e1" + curl -fsSL --retry 3 "$base/scripts/component-release/release.py" -o "$kit/release.py" + echo "2455bafc6f42975a07583af836b78c58c0741fa02e91984804cb1690725bf402 $kit/release.py" | sha256sum -c - + python3 "$kit/release.py" check \ + --repository "$CI_REPO" \ + --component-id std-data \ + --kind stdlib \ + --allow modules \ + --allow README.md diff --git a/.woodpecker/publish.yml b/.woodpecker/publish.yml new file mode 100644 index 0000000..879508a --- /dev/null +++ b/.woodpecker/publish.yml @@ -0,0 +1,33 @@ +# Protected publish lane: tag events only. +# +# Single ecosystem component release implementation (marqdo#96 M1), pinned by +# root commit and file sha256. Ordinary push/PR never receives the publish +# token; only this protected tag workflow creates the immutable Gitea Release. +when: + event: [tag] + +steps: + publish: + image: git.cflmy.cn/cflmy/marqdo-ci-shell:3.0.0-rc.6 + environment: + GITEA_PUBLISH_TOKEN: + from_secret: gitea_publish_token + commands: + - | + set -eu + test -n "${CI_COMMIT_TAG:?publish requires a tag event}" + kit=$(mktemp -d) + trap 'rm -rf "$kit"' EXIT + base="https://git.cflmy.cn/cflmy/marqdo/raw/commit/c367d1df3ebdaa08578ea304d50bb9419bef16e1" + curl -fsSL --retry 3 "$base/scripts/component-release/release.py" -o "$kit/release.py" + echo "2455bafc6f42975a07583af836b78c58c0741fa02e91984804cb1690725bf402 $kit/release.py" | sha256sum -c - + exec python3 "$kit/release.py" publish \ + --repository "$CI_REPO" \ + --component-id std-data \ + --kind stdlib \ + --allow modules \ + --allow README.md \ + --tag "$CI_COMMIT_TAG" \ + --dependency "id=cli,source_sha=63776735e924ade279cdf59d5c733dc24bfdabbb,asset_sha256=8dc0b006302e03c23451b8ea9f8a0fcdae8bf67c80c546bee2434bf69755bfe3" \ + --note "Tested by the same-SHA Woodpecker component lane with the shared marqdo-ci-shell:3.0.0-rc.6 image (CLI 3.0.0-rc.6 and the official Stdlib Bundle 0.3.0)." \ + --note "Released module bytes are identical to the accepted Stdlib Bundle 0.3.0; this release carries the deterministic source-archive packaging and the protected Woodpecker publish lane." -- 2.54.1