fix(release): pass ClawHub parent state policy

This commit is contained in:
Vincent Koc
2026-08-21 00:43:36 -07:00
parent 598b5369e6
commit b6d7394a98
2 changed files with 8 additions and 1 deletions
+3 -1
View File
@@ -977,6 +977,7 @@ jobs:
SOURCE_REF: ${{ needs.resolve_bootstrap_plan.outputs.ref_revision }}
SOURCE_REPO: ${{ github.repository }}
OPENCLAW_CLAWHUB_CLI: ${{ steps.clawhub_cli.outputs.cli }}
RELEASE_PUBLISH_PARENT_STATE_POLICY: ${{ inputs.release_publish_run_id != '' && (github.actor == 'github-actions[bot]' && 'active' || 'manual-recovery') || '' }}
RELEASE_PUBLISH_RUN_ATTEMPT: ${{ inputs.release_publish_run_attempt }}
RELEASE_PUBLISH_RUN_ID: ${{ inputs.release_publish_run_id }}
RELEASE_TAG: ${{ inputs.release_tag }}
@@ -1004,7 +1005,8 @@ jobs:
--workflow-full-ref "${WORKFLOW_FULL_REF}" \
--workflow-sha "${WORKFLOW_SHA}" \
--release-publish-run-id "${RELEASE_PUBLISH_RUN_ID}" \
--release-publish-run-attempt "${RELEASE_PUBLISH_RUN_ATTEMPT}"
--release-publish-run-attempt "${RELEASE_PUBLISH_RUN_ATTEMPT}" \
--release-publish-parent-state-policy "${RELEASE_PUBLISH_PARENT_STATE_POLICY}"
}
while IFS= read -r plugin; do
@@ -387,6 +387,8 @@ describe("Plugin ClawHub New workflow", () => {
expect(publishRun).toContain("OPENCLAW_CLAWHUB_TARGET_SHA");
expect(publishStep.env).toMatchObject({
GH_TOKEN: "${{ github.token }}",
RELEASE_PUBLISH_PARENT_STATE_POLICY:
"${{ inputs.release_publish_run_id != '' && (github.actor == 'github-actions[bot]' && 'active' || 'manual-recovery') || '' }}",
RELEASE_PUBLISH_RUN_ATTEMPT: "${{ inputs.release_publish_run_attempt }}",
RELEASE_PUBLISH_RUN_ID: "${{ inputs.release_publish_run_id }}",
WORKFLOW_FULL_REF: "${{ github.ref }}",
@@ -401,6 +403,9 @@ describe("Plugin ClawHub New workflow", () => {
expect(publishRun).toContain('--workflow-sha "${WORKFLOW_SHA}"');
expect(publishRun).toContain('--release-publish-run-id "${RELEASE_PUBLISH_RUN_ID}"');
expect(publishRun).toContain('--release-publish-run-attempt "${RELEASE_PUBLISH_RUN_ATTEMPT}"');
expect(publishRun).toContain(
'--release-publish-parent-state-policy "${RELEASE_PUBLISH_PARENT_STATE_POLICY}"',
);
expect(publishRun).not.toContain("--allow-prevalidated-ref");
const verifierCalls = [