From 3f8c994aa9484a2170a4e08d329d358333dfa92c Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 13 Nov 2025 23:44:40 +0000 Subject: [PATCH] Use GITHUB_EVENT_PATH to parse inputs avoiding template context errors --- .github/workflows/create-release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 86293f9..7ffaec8 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -31,7 +31,11 @@ jobs: TAG="${GITHUB_REF#refs/tags/}" VERSION="${TAG#v}" else - VERSION="${{ github.event.inputs.version }}" + VERSION=$(jq -r '.inputs.version // ""' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") + if [ -z "$VERSION" ]; then + echo "::error::workflow_dispatch must include a version input" + exit 1 + fi TAG="v${VERSION}" fi echo "tag=${TAG}" >> $GITHUB_OUTPUT @@ -322,10 +326,9 @@ jobs: - name: Prepare release notes id: generate_notes - env: - RELEASE_NOTES_INPUT: ${{ github.event.inputs.release_notes || '' }} run: | VERSION="${{ needs.extract_version.outputs.version }}" + RELEASE_NOTES_INPUT=$(jq -r '.inputs.release_notes // ""' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") # Save release notes to file NOTES_FILE=$(mktemp)