Files
marqdo/scripts/component-release/templates/publish.yml
T
cflmyandCursor a61f3442bc
ci/woodpecker/push/eco Pipeline is pending
ci/woodpecker/pr/eco Pipeline is pending
ci: complete component release propagation for issue #10
Add authoritative component-release helpers, evidence-aware reconcile with
freshness and root upstream dispatch, least-privilege secrets, image scan
and multi-arch build gates, and pin active component publish workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-27 19:30:18 +08:00

34 lines
1.2 KiB
YAML

# Protected publish workflow: tag or manual only.
# Holds the publish token. Push/PR lanes must never mount this secret.
when:
- event: [tag, manual]
steps:
publish:
image: git.cflmy.cn/cflmy/marqdo-ci-shell:3.0.0-rc.5
environment:
GITEA_PUBLISH_TOKEN:
from_secret: gitea_publish_token
COMPONENT_ID: "${COMPONENT_ID}"
REPOSITORY: "${REPOSITORY}"
commands:
- |
set -eu
test -n "${GITEA_PUBLISH_TOKEN:?gitea_publish_token secret missing}"
test -n "${CI_COMMIT_TAG:?publish requires a tag}"
export SOURCE_SHA="${CI_COMMIT_SHA}"
export VERSION="${CI_COMMIT_TAG#v}"
export TAG="${CI_COMMIT_TAG}"
sh scripts/package.sh
ARCHIVE="dist/marqdo-${COMPONENT_ID}-${VERSION}-source.tar.gz"
python3 scripts/release/publish_gitea.py \
--repo "$REPOSITORY" \
--tag "$TAG" \
--target "$SOURCE_SHA" \
--prerelease \
--body "Automated source release for ${COMPONENT_ID} ${TAG}." \
--asset "$ARCHIVE" \
--asset "${ARCHIVE}.sha256" \
--asset dist/release-evidence.json \
--evidence-out dist/gitea-publish-result.json