Skip to content

fix(ci): mass-release fails loudly instead of silent Skipped (use github.event.inputs)#13

Merged
cloviscoli merged 1 commit into
masterfrom
claude/fix-mass-release-confirm
May 12, 2026
Merged

fix(ci): mass-release fails loudly instead of silent Skipped (use github.event.inputs)#13
cloviscoli merged 1 commit into
masterfrom
claude/fix-mass-release-confirm

Conversation

@cloviscoli

Copy link
Copy Markdown
Contributor

Problema

Você disparou mass-release.yml com confirm: PUBLISH (correto) e o GitHub Actions devolveu Skipped sem log nenhum, sem erro — impossível diagnosticar.

Root cause

O guard estava no nível do job:

jobs:
  mass-release:
    if: inputs.confirm == 'PUBLISH'

Pra workflow_dispatch, o contexto canônico é github.event.inputs.*. O inputs.* "unificado" foi introduzido depois mas é principalmente pensado pra workflow_call (reusable workflows); em expressões a nível de job em workflow_dispatch ele se comporta de forma inconsistente. Quando a expressão é falsy, o GitHub simplesmente pula o job sem log — pior UX possível pra debug.

Fix

  1. Removo o guard de nível de job e troco por um step Validate inputs que roda sempre, faz echo dos três inputs e dá exit 1 com ::error:: claro se confirm != "PUBLISH". Falha alta e visível em vez de Skipped fantasma.
  2. Troco todo inputs.<x> por github.event.inputs.<x> no resto do workflow (gate do dry_run, include_mcp, summary). Inclui mudança sutil mas importante:
    • Antes: if: inputs.dry_run != true (comparação booleana)
    • Depois: if: github.event.inputs.dry_run != 'true' (comparação de string — github.event.inputs.* sempre vem como string, independente do type: boolean declarado).

Como rodar depois do merge

  1. Actions → "Mass Release" → Run workflow (a partir de master).
  2. Inputs:
    • confirm: PUBLISH (literal, case-sensitive)
    • include_mcp: deixado em branco/false
    • dry_run: marcado (true) — pra primeira passada
  3. Aguardar conclusão. Logs do step Validate inputs vão mostrar exatamente o que o GitHub Actions recebeu.
  4. Confirmado o dry-run, re-dispatch com dry_run: false pra publicar.

Test plan

  • Após merge, rodar mass-release.yml em dry-run com confirm: PUBLISH — esperar conclusão verde, sem Skipped.
  • Rodar com confirm: publish (lowercase) — esperar falha alta com mensagem "The 'confirm' input must be exactly 'PUBLISH'..." em vez de Skipped silencioso.
  • Re-rodar dry-run com confirm: PUBLISH e dry_run: false — esperar push pro NuGet.org dos 23 pacotes novos (Data 6.3.0 + 22 alinhados); EF 6.3.0 é no-op via --skip-duplicate.

https://claude.ai/code/session_015jxScBEvdKkRwGvJTgK5Py


Generated by Claude Code

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.<x>" reference inside the job with
  "github.event.inputs.<x>" 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
@cloviscoli cloviscoli merged commit 58c1f54 into master May 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants