From 78a8caef381eb46df6dfd92d62c71929f0558e76 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 23 Jun 2026 14:53:14 +0800 Subject: [PATCH] fix(release): require postpublish evidence artifact --- .github/workflows/openclaw-release-publish.yml | 4 ++-- test/scripts/package-acceptance-workflow.test.ts | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/openclaw-release-publish.yml b/.github/workflows/openclaw-release-publish.yml index 3d5d11fa52a..7cdad81a70e 100644 --- a/.github/workflows/openclaw-release-publish.yml +++ b/.github/workflows/openclaw-release-publish.yml @@ -1466,9 +1466,9 @@ jobs: fi - name: Upload postpublish evidence - if: ${{ always() }} + if: ${{ always() && inputs.publish_openclaw_npm }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: openclaw-release-postpublish-evidence-${{ inputs.tag }} path: ${{ runner.temp }}/openclaw-release-postpublish-evidence - if-no-files-found: ignore + if-no-files-found: error diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index e61900daf5d..fa712272c11 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -2237,6 +2237,13 @@ describe("package artifact reuse", () => { expect(clawHubReleasePlanScript).toContain("--plugin-clawhub-bootstrap-run"); expect(releaseWorkflow).toContain('verify_args+=(--plugins "${PLUGINS}")'); expect(releaseWorkflow).toContain("openclaw-release-postpublish-evidence"); + const postpublishEvidenceUpload = workflowStep( + workflowJob(RELEASE_PUBLISH_WORKFLOW, "publish"), + "Upload postpublish evidence", + ); + expect(postpublishEvidenceUpload.if).toContain("always()"); + expect(postpublishEvidenceUpload.if).toContain("inputs.publish_openclaw_npm"); + expect(postpublishEvidenceUpload.with?.["if-no-files-found"]).toBe("error"); expect(releaseWorkflow).toContain("Failed child job summary"); expect(releaseWorkflow).toContain("Workflow completion waits for ClawHub"); expect(releaseWorkflow).toContain("Workflow completion does not wait for ClawHub");