

























@@ -37,6 +37,15 @@ on:
3737required: true
3838default: true
3939type: boolean
40+release_profile:
41+description: Release coverage profile used for release evidence summaries
42+required: false
43+default: beta
44+type: choice
45+options:
46+ - beta
47+ - stable
48+ - full
4049wait_for_clawhub:
4150description: Wait for ClawHub plugin publish before marking this workflow complete
4251required: true
@@ -62,7 +71,7 @@ jobs:
6271runs-on: ubuntu-latest
6372timeout-minutes: 20
6473outputs:
65-sha: ${{ steps.ref.outputs.sha }}
74+sha: ${{ steps.manifest.outputs.sha || steps.ref.outputs.sha }}
6675steps:
6776 - name: Validate inputs
6877env:
@@ -72,6 +81,7 @@ jobs:
7281PLUGIN_PUBLISH_SCOPE: ${{ inputs.plugin_publish_scope }}
7382PLUGINS: ${{ inputs.plugins }}
7483RELEASE_NPM_DIST_TAG: ${{ inputs.npm_dist_tag }}
84+RELEASE_PROFILE: ${{ inputs.release_profile }}
7585WORKFLOW_REF: ${{ github.ref }}
7686run: |
7787 set -euo pipefail
@@ -103,6 +113,23 @@ jobs:
103113 echo "plugin_publish_scope=all-publishable must not include plugins." >&2
104114 exit 1
105115 fi
116+ case "$RELEASE_PROFILE" in
117+ beta|stable|full) ;;
118+ *)
119+ echo "release_profile must be one of: beta, stable, full" >&2
120+ exit 1
121+ ;;
122+ esac
123+124+ - name: Download OpenClaw npm preflight manifest
125+if: ${{ inputs.publish_openclaw_npm }}
126+uses: actions/download-artifact@v8
127+with:
128+name: openclaw-npm-preflight-${{ inputs.tag }}
129+path: preflight-manifest
130+repository: ${{ github.repository }}
131+run-id: ${{ inputs.preflight_run_id }}
132+github-token: ${{ github.token }}
106133107134 - name: Checkout release tag
108135uses: actions/checkout@v6
@@ -111,17 +138,53 @@ jobs:
111138fetch-depth: 0
112139persist-credentials: false
113140114- - name: Setup Node environment
115-uses: ./.github/actions/setup-node-env
116-with:
117-node-version: ${{ env.NODE_VERSION }}
118-pnpm-version: ${{ env.PNPM_VERSION }}
119-install-bun: "false"
120-121141 - name: Resolve checked-out release ref
122142id: ref
123143run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
124144145+ - name: Validate OpenClaw npm preflight manifest
146+id: manifest
147+if: ${{ inputs.publish_openclaw_npm }}
148+env:
149+RELEASE_TAG: ${{ inputs.tag }}
150+RELEASE_NPM_DIST_TAG: ${{ inputs.npm_dist_tag }}
151+EXPECTED_SHA: ${{ steps.ref.outputs.sha }}
152+run: |
153+ set -euo pipefail
154+ manifest="preflight-manifest/preflight-manifest.json"
155+ if [[ ! -f "$manifest" ]]; then
156+ echo "OpenClaw npm preflight manifest is missing." >&2
157+ ls -la preflight-manifest >&2 || true
158+ exit 1
159+ fi
160+ release_tag="$(jq -r '.releaseTag // ""' "$manifest")"
161+ release_sha="$(jq -r '.releaseSha // ""' "$manifest")"
162+ npm_dist_tag="$(jq -r '.npmDistTag // ""' "$manifest")"
163+ tarball_name="$(jq -r '.tarballName // ""' "$manifest")"
164+ tarball_sha256="$(jq -r '.tarballSha256 // ""' "$manifest")"
165+ if [[ "$release_tag" != "$RELEASE_TAG" ]]; then
166+ echo "Preflight manifest tag mismatch: expected $RELEASE_TAG, got $release_tag" >&2
167+ exit 1
168+ fi
169+ if [[ "$release_sha" != "$EXPECTED_SHA" ]]; then
170+ echo "Preflight manifest SHA mismatch: expected $EXPECTED_SHA, got $release_sha" >&2
171+ exit 1
172+ fi
173+ if [[ "$npm_dist_tag" != "$RELEASE_NPM_DIST_TAG" ]]; then
174+ echo "Preflight manifest npm dist-tag mismatch: expected $RELEASE_NPM_DIST_TAG, got $npm_dist_tag" >&2
175+ exit 1
176+ fi
177+ if [[ -z "$tarball_name" || ! -f "preflight-manifest/$tarball_name" ]]; then
178+ echo "Preflight manifest tarball is missing: $tarball_name" >&2
179+ exit 1
180+ fi
181+ actual_tarball_sha256="$(sha256sum "preflight-manifest/$tarball_name" | awk '{print $1}')"
182+ if [[ "$actual_tarball_sha256" != "$tarball_sha256" ]]; then
183+ echo "Preflight manifest tarball digest mismatch." >&2
184+ exit 1
185+ fi
186+ echo "sha=$release_sha" >> "$GITHUB_OUTPUT"
187+125188 - name: Validate release tag is reachable from main or release branch
126189run: |
127190 set -euo pipefail
@@ -139,26 +202,25 @@ jobs:
139202 echo "Release tag must point to a commit reachable from main or release/*." >&2
140203 exit 1
141204142- - name: Verify plugin versions were synced for this release
143-run: pnpm plugins:sync:check
144-145205 - name: Summarize release target
146206env:
147207RELEASE_TAG: ${{ inputs.tag }}
148-TARGET_SHA: ${{ steps.ref.outputs.sha }}
208+TARGET_SHA: ${{ steps.manifest.outputs.sha || steps.ref.outputs.sha }}
209+RELEASE_PROFILE: ${{ inputs.release_profile }}
149210run: |
150211 {
151212 echo "### Release target"
152213 echo
153214 echo "- Tag: \`${RELEASE_TAG}\`"
154215 echo "- SHA: \`${TARGET_SHA}\`"
216+ echo "- Release profile: \`${RELEASE_PROFILE}\`"
155217 } >> "$GITHUB_STEP_SUMMARY"
156218157219 publish:
158220name: Publish plugins, then OpenClaw
159221needs: [resolve_release_target]
160222runs-on: ubuntu-latest
161-timeout-minutes: 90
223+timeout-minutes: 60
162224steps:
163225 - name: Dispatch publish workflows
164226env:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。