Skip to content

ci(release): fix dry-run gate broken by github.event_name in reusable workflows#172

Merged
d-laub merged 1 commit into
mainfrom
fix/release-dryrun-event-name
May 21, 2026
Merged

ci(release): fix dry-run gate broken by github.event_name in reusable workflows#172
d-laub merged 1 commit into
mainfrom
fix/release-dryrun-event-name

Conversation

@d-laub
Copy link
Copy Markdown
Collaborator

@d-laub d-laub commented May 21, 2026

Bug

The previous dry-run gate in release.yaml was:

```yaml

  • name: Dry-run summary
    if: github.event_name == 'workflow_call' && inputs.dry_run == true
  • name: Create GitHub release
    if: ${{ !(github.event_name == 'workflow_call' && inputs.dry_run == true) }}
    ```

In a reusable workflow invoked via workflow_call, github.event_name is the parent trigger (here, workflow_dispatch from release-pipeline.yaml), not workflow_call. So the condition was always false: Dry-run summary skipped, Create GitHub release ran.

The dry-run of run 26254656039 consequently created a real v0.25.0 tag and GH release with a placeholder body. The tag and release were manually cleaned up before this PR. PyPI publish, push-to-stable, and the bump commit were not affected — they correctly gate on inputs.dry_run directly.

Fix

Gate on inputs.dry_run directly. Also add dry_run to the workflow_dispatch input list so the standalone form supports dry-run too.

Test plan

  • After merge, dispatch Release pipeline with increment=auto, dry_run=true and confirm release step shows Dry-run summary ✅ and Create GitHub release skipped.
  • Confirm no v0.25.0 tag/release is created.

… workflows

In a workflow_call'd workflow, github.event_name reports the parent
trigger (workflow_dispatch from release-pipeline), not 'workflow_call'.
So the previous condition github.event_name == 'workflow_call' always
evaluated false, causing Dry-run summary to skip and Create GitHub
release to run during dry-run dispatches — producing a real v0.25.0
tag and release with a placeholder body.

Fix: gate on inputs.dry_run directly. Add dry_run input to the
workflow_dispatch form so standalone dispatches can dry-run too.
@d-laub d-laub merged commit d27fb34 into main May 21, 2026
5 checks passed
@d-laub d-laub deleted the fix/release-dryrun-event-name branch May 21, 2026 21:59
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.

1 participant