From 0c008395866eb1e25a87aa7a67f78e7ca45c64a3 Mon Sep 17 00:00:00 2001 From: PAMulligan Date: Tue, 26 May 2026 19:53:08 -0400 Subject: [PATCH] fix(ci): guard fromJSON against empty release PR output The release-please workflow failed template validation on runs where no release PR exists (e.g. the release/merge run): steps.release.outputs.pr is an empty string, and a step's env: expressions are evaluated even when the step is skipped by its if: guard, so fromJSON('') raised "Error reading JToken from JsonReader." Short-circuit the expression so fromJSON is only called when pr is set. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release-please.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index dcd3b45..5c0ee82 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -51,7 +51,7 @@ jobs: - name: Rebuild and commit cdn/ bundle if: ${{ steps.release.outputs.pr }} env: - PR_BRANCH: ${{ fromJSON(steps.release.outputs.pr).headBranchName }} + PR_BRANCH: ${{ steps.release.outputs.pr && fromJSON(steps.release.outputs.pr).headBranchName || '' }} run: | pnpm --dir widget install --frozen-lockfile pnpm --dir widget run build:embed