test(release): cover protected plugin publish refs (#108227)

This commit is contained in:
Peter Steinberger
2026-07-15 03:14:59 -07:00
committed by GitHub
parent 4975cf75b4
commit f7718d9a91

View File

@@ -357,12 +357,14 @@ describe("plugin npm extended-stable workflow", () => {
);
expect(consume.run).toContain("--workflow-jobs-metadata");
expect(consume.run).toContain("--source-package-json-sha256");
expect(consume.run).toContain("sha_pinned_release_publish=false");
expect(consume.run).toContain(
'[[ "$WORKFLOW_REF" =~ ^refs/tags/release-publish/([a-f0-9]{12})-[1-9][0-9]*$ ]]',
);
expect(consume.run).toContain(
'[[ "$WORKFLOW_SHA" =~ ^[a-f0-9]{40}$ && "${WORKFLOW_SHA:0:12}" == "$workflow_sha_prefix" ]]',
);
expect(consume.run).toContain("sha_pinned_release_publish=true");
expect(consume.run).toContain(
'[[ "$WORKFLOW_REF" == "refs/heads/main" || "$sha_pinned_release_publish" == "true" ]]',
);