























@@ -11,6 +11,10 @@ on:
1111description: Successful OpenClaw NPM Release preflight run id, required when publish_openclaw_npm=true
1212required: false
1313type: string
14+full_release_validation_run_id:
15+description: Successful Full Release Validation run id for this tag/SHA, required when publish_openclaw_npm=true
16+required: false
17+type: string
1418npm_dist_tag:
1519description: npm dist-tag for the OpenClaw package
1620required: true
@@ -77,6 +81,7 @@ jobs:
7781env:
7882RELEASE_TAG: ${{ inputs.tag }}
7983PREFLIGHT_RUN_ID: ${{ inputs.preflight_run_id }}
84+FULL_RELEASE_VALIDATION_RUN_ID: ${{ inputs.full_release_validation_run_id }}
8085PUBLISH_OPENCLAW_NPM: ${{ inputs.publish_openclaw_npm && 'true' || 'false' }}
8186PLUGIN_PUBLISH_SCOPE: ${{ inputs.plugin_publish_scope }}
8287PLUGINS: ${{ inputs.plugins }}
@@ -101,6 +106,10 @@ jobs:
101106 echo "publish_openclaw_npm=true requires preflight_run_id." >&2
102107 exit 1
103108 fi
109+ if [[ "${PUBLISH_OPENCLAW_NPM}" == "true" && -z "${FULL_RELEASE_VALIDATION_RUN_ID}" ]]; then
110+ echo "publish_openclaw_npm=true requires full_release_validation_run_id." >&2
111+ exit 1
112+ fi
104113 if [[ "${PUBLISH_OPENCLAW_NPM}" == "true" && "${WORKFLOW_REF}" != "refs/heads/main" && ! "${WORKFLOW_REF}" =~ ^refs/heads/release/[0-9]{4}\.[1-9][0-9]*\.[1-9][0-9]*$ ]]; then
105114 echo "publish_openclaw_npm=true requires dispatching this workflow from main or release/YYYY.M.D." >&2
106115 exit 1
@@ -131,6 +140,16 @@ jobs:
131140run-id: ${{ inputs.preflight_run_id }}
132141github-token: ${{ github.token }}
133142143+ - name: Download full release validation manifest
144+if: ${{ inputs.publish_openclaw_npm }}
145+uses: actions/download-artifact@v8
146+with:
147+name: full-release-validation-${{ inputs.full_release_validation_run_id }}
148+path: ${{ runner.temp }}/full-release-validation-manifest
149+repository: ${{ github.repository }}
150+run-id: ${{ inputs.full_release_validation_run_id }}
151+github-token: ${{ github.token }}
152+134153 - name: Checkout release tag
135154uses: actions/checkout@v6
136155with:
@@ -186,6 +205,46 @@ jobs:
186205 fi
187206 echo "sha=$release_sha" >> "$GITHUB_OUTPUT"
188207208+ - name: Validate full release validation manifest
209+if: ${{ inputs.publish_openclaw_npm }}
210+env:
211+GH_TOKEN: ${{ github.token }}
212+FULL_RELEASE_VALIDATION_RUN_ID: ${{ inputs.full_release_validation_run_id }}
213+EXPECTED_SHA: ${{ steps.ref.outputs.sha }}
214+EXPECTED_RELEASE_PROFILE: ${{ inputs.release_profile }}
215+EXPECTED_WORKFLOW_BRANCH: ${{ github.ref_name }}
216+run: |
217+ set -euo pipefail
218+ RUN_JSON="$(gh run view "$FULL_RELEASE_VALIDATION_RUN_ID" --repo "$GITHUB_REPOSITORY" --json workflowName,headBranch,event,status,conclusion,url)"
219+ printf '%s' "$RUN_JSON" | node -e 'const fs = require("node:fs"); const run = JSON.parse(fs.readFileSync(0, "utf8")); const checks = [["workflowName", "Full Release Validation"], ["headBranch", process.env.EXPECTED_WORKFLOW_BRANCH], ["event", "workflow_dispatch"], ["status", "completed"], ["conclusion", "success"]]; for (const [key, expected] of checks) { if (run[key] !== expected) { console.error(`Referenced full release validation run ${process.env.FULL_RELEASE_VALIDATION_RUN_ID} must have ${key}=${expected}, got ${run[key] ?? "<missing>"}.`); process.exit(1); } } console.log(`Using full release validation run ${process.env.FULL_RELEASE_VALIDATION_RUN_ID}: ${run.url}`);'
220+221+ manifest="${RUNNER_TEMP}/full-release-validation-manifest/full-release-validation-manifest.json"
222+ if [[ ! -f "$manifest" ]]; then
223+ echo "Full release validation manifest is missing." >&2
224+ ls -la "${RUNNER_TEMP}/full-release-validation-manifest" >&2 || true
225+ exit 1
226+ fi
227+ workflow_name="$(jq -r '.workflowName // ""' "$manifest")"
228+ target_sha="$(jq -r '.targetSha // ""' "$manifest")"
229+ release_profile="$(jq -r '.releaseProfile // ""' "$manifest")"
230+ rerun_group="$(jq -r '.rerunGroup // ""' "$manifest")"
231+ if [[ "$workflow_name" != "Full Release Validation" ]]; then
232+ echo "Full release validation manifest workflow mismatch: $workflow_name" >&2
233+ exit 1
234+ fi
235+ if [[ "$target_sha" != "$EXPECTED_SHA" ]]; then
236+ echo "Full release validation target SHA mismatch: expected $EXPECTED_SHA, got $target_sha" >&2
237+ exit 1
238+ fi
239+ if [[ "$release_profile" != "$EXPECTED_RELEASE_PROFILE" ]]; then
240+ echo "Full release validation profile mismatch: expected $EXPECTED_RELEASE_PROFILE, got $release_profile" >&2
241+ exit 1
242+ fi
243+ if [[ "$rerun_group" != "all" ]]; then
244+ echo "Full release validation must run rerun_group=all before npm publish; got $rerun_group" >&2
245+ exit 1
246+ fi
247+189248 - name: Validate release tag is reachable from main or release branch
190249run: |
191250 set -euo pipefail
@@ -208,13 +267,17 @@ jobs:
208267RELEASE_TAG: ${{ inputs.tag }}
209268TARGET_SHA: ${{ steps.manifest.outputs.sha || steps.ref.outputs.sha }}
210269RELEASE_PROFILE: ${{ inputs.release_profile }}
270+FULL_RELEASE_VALIDATION_RUN_ID: ${{ inputs.full_release_validation_run_id }}
211271run: |
212272 {
213273 echo "### Release target"
214274 echo
215275 echo "- Tag: \`${RELEASE_TAG}\`"
216276 echo "- SHA: \`${TARGET_SHA}\`"
217277 echo "- Release profile: \`${RELEASE_PROFILE}\`"
278+ if [[ -n "${FULL_RELEASE_VALIDATION_RUN_ID// }" ]]; then
279+ echo "- Full release validation: \`${FULL_RELEASE_VALIDATION_RUN_ID}\`"
280+ fi
218281 } >> "$GITHUB_STEP_SUMMARY"
219282220283 publish:
@@ -237,6 +300,7 @@ jobs:
237300CHILD_WORKFLOW_REF: ${{ github.ref_name }}
238301RELEASE_TAG: ${{ inputs.tag }}
239302PREFLIGHT_RUN_ID: ${{ inputs.preflight_run_id }}
303+FULL_RELEASE_VALIDATION_RUN_ID: ${{ inputs.full_release_validation_run_id }}
240304RELEASE_NPM_DIST_TAG: ${{ inputs.npm_dist_tag }}
241305PLUGIN_PUBLISH_SCOPE: ${{ inputs.plugin_publish_scope }}
242306PLUGINS: ${{ inputs.plugins }}
@@ -473,6 +537,7 @@ jobs:
473537 -f tag="${RELEASE_TAG}" \
474538 -f preflight_only=false \
475539 -f preflight_run_id="${PREFLIGHT_RUN_ID}" \
540+ -f full_release_validation_run_id="${FULL_RELEASE_VALIDATION_RUN_ID}" \
476541 -f npm_dist_tag="${RELEASE_NPM_DIST_TAG}")"
477542 echo "- OpenClaw npm run ID: \`${openclaw_npm_run_id}\`" >> "$GITHUB_STEP_SUMMARY"
478543 else
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。