From de6b3510d47b93e8e1af5313768ae5a6767b41f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 07:39:25 +0000 Subject: [PATCH] test(release): cover release-event publish routing Co-authored-by: okikio <17222836+okikio@users.noreply.github.com> --- tests/publishing_setup_test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/publishing_setup_test.ts b/tests/publishing_setup_test.ts index 1fc7052..f6304db 100644 --- a/tests/publishing_setup_test.ts +++ b/tests/publishing_setup_test.ts @@ -58,9 +58,13 @@ describe("publishing setup", () => { ); }); - it("publishes only from release events or explicit publish-only retries", () => { + it("triggers publishing only from release events or explicit publish-only workflow dispatches", () => { const publish_workflow = readRepoFile(".github/workflows/publish.yml"); + expect(publish_workflow).toContain("types: [published]"); + expect(publish_workflow).toContain( + 'if [ "$EVENT_NAME" = "release" ]; then', + ); expect(publish_workflow).toContain( "the published release event publishes the tagged commit to JSR and npm", ); @@ -74,6 +78,7 @@ describe("publishing setup", () => { it("uses npm trusted publishing without requiring a token secret", () => { const publish_workflow = readRepoFile(".github/workflows/publish.yml"); + expect(publish_workflow).toContain("id-token: write"); expect(publish_workflow).toContain( "npm publish --provenance --access public", ); -- 2.51.2