Skip to content

fix(ci): Prevent release-please double-run on release PR merge #145

@WilliamBerryiii

Description

@WilliamBerryiii

Bug Description

When a release-please PR merges to main, the push event triggers the CI workflow (main.yml), which runs the release-please job again. This causes release-please to immediately create a spurious follow-up release PR with duplicate changelog entries.

Example: PR #143 (chore(main): release 0.1.0) merged → triggered CI → release-please ran again → created PR #144 (chore(main): release 0.2.0) with duplicate content.

Steps to Reproduce

  1. Merge a release-please PR to main
  2. Observe the CI workflow triggers on the push to main
  3. The release-please job runs and creates another release PR

Expected Behavior

The release-please job should skip when the triggering commit is a release-please merge commit (chore(main): release ...).

Root Cause

The original standalone release-please.yml (commit b75ccaa) included a skip guard:

if: "${{ !startsWith(github.event.head_commit.message, 'chore(main): release') }}"

This was lost when the job was consolidated into main.yml (commit f930b6b).

Fix

Restore the if condition on the release-please job in .github/workflows/main.yml.

Metadata

Metadata

Labels

bugSomething isn't workingci/cdCI/CD pipeline and automationfixBug fixessize-sSmall: 1-4 hours

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions