From 20a455ba7d62d1d47461ad54269758758f48d1e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 12 May 2026 22:48:57 +0000 Subject: [PATCH] fix(ci): mass-release fails loudly instead of silently Skipped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Symptom: dispatching mass-release with confirm=PUBLISH showed up as "Skipped" with no logs, no error, nothing actionable. Root cause: the job-level guard "if: inputs.confirm == 'PUBLISH'" was not matching. For workflow_dispatch the canonical context is github.event.inputs.*; the unified "inputs.*" context is intended for workflow_call (reusable workflows) and behaves inconsistently in job-level expressions for manually triggered runs. When the expression evaluates to falsy, GitHub silently skips the job — no log to point at. Two changes: - Replace the job-level guard with a "Validate inputs" step that runs unconditionally and exits 1 with a clear ::error:: message if confirm is anything other than the literal string "PUBLISH". The user now sees exactly what value was received. - Replace every "inputs." reference inside the job with "github.event.inputs." for consistency. Notably, the publish gate changes from "if: inputs.dry_run != true" (boolean comparison) to "if: github.event.inputs.dry_run != 'true'" (string comparison), since github.event.inputs always exposes inputs as strings. The Validate step echoes confirm/dry_run/include_mcp before checking them, so future debugging is trivial. https://claude.ai/code/session_015jxScBEvdKkRwGvJTgK5Py --- .github/workflows/mass-release.yml | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mass-release.yml b/.github/workflows/mass-release.yml index ebe169b..06977bd 100644 --- a/.github/workflows/mass-release.yml +++ b/.github/workflows/mass-release.yml @@ -35,11 +35,32 @@ env: jobs: mass-release: runs-on: ubuntu-latest - if: inputs.confirm == 'PUBLISH' + # Note: the confirm input is validated explicitly in the first step of this + # job, not via a job-level `if:`. A job-level `if: inputs.confirm == 'PUBLISH'` + # silently marks the run as "Skipped" when the input does not match, which + # is awful for debugging — you cannot tell whether the workflow refused you + # or never started. The step-based check below fails loud with a clear + # error message. permissions: contents: read steps: + - name: Validate inputs + env: + CONFIRM: ${{ github.event.inputs.confirm }} + DRY_RUN: ${{ github.event.inputs.dry_run }} + INCLUDE_MCP: ${{ github.event.inputs.include_mcp }} + run: | + set -euo pipefail + echo "confirm=${CONFIRM:-}" + echo "dry_run=${DRY_RUN:-}" + echo "include_mcp=${INCLUDE_MCP:-}" + if [ "${CONFIRM:-}" != "PUBLISH" ]; then + echo "::error::The 'confirm' input must be exactly 'PUBLISH' (case-sensitive). Got '${CONFIRM:-}'." + exit 1 + fi + echo "Confirm input OK." + - name: Checkout uses: actions/checkout@v4 with: @@ -81,7 +102,7 @@ jobs: echo "::endgroup::" done - if [ "${{ inputs.include_mcp }}" = "true" ]; then + if [ "${{ github.event.inputs.include_mcp }}" = "true" ]; then echo "::group::Pack mcp ($MCP_PROJECT)" dotnet pack "$MCP_PROJECT" --configuration "$CONFIGURATION" --output ./artifacts echo "::endgroup::" @@ -98,7 +119,7 @@ jobs: if-no-files-found: error - name: Push to NuGet.org - if: inputs.dry_run != true + if: github.event.inputs.dry_run != 'true' env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} run: | @@ -120,8 +141,8 @@ jobs: { echo "## Mass release summary" echo "" - echo "- Dry run: \`${{ inputs.dry_run }}\`" - echo "- Mcp included: \`${{ inputs.include_mcp }}\`" + echo "- Dry run: \`${{ github.event.inputs.dry_run }}\`" + echo "- Mcp included: \`${{ github.event.inputs.include_mcp }}\`" echo "" echo "### Packed artifacts" echo ""