Skip to content

fix: skip release-please job on chore release merge commits - #69

Merged
spmse merged 3 commits into
mainfrom
copilot/adjust-ci-release-trigger
Aug 2, 2026
Merged

spmse merged 3 commits into
mainfrom
copilot/adjust-ci-release-trigger

Conversation

Copilot AI commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Added a commit-message guard to the release-please job so it does not run when a release PR merge commit is pushed to main.

Why

release-please generates merge commits with the message chore: release <version>. Without a guard, every such merge immediately triggers release-please again, causing it to open a new release PR right after the previous one was merged.

Before:

release-please:
  if: github.event_name == 'push'

After:

release-please:
  if: >-
    github.event_name == 'push' &&
    !startsWith(github.event.head_commit.message, 'chore: release')

Validation

  • python -m ruff check .
  • python -m ruff format --check .
  • python -m pytest
  • python -m build --sdist --wheel
  • Not applicable — workflow YAML change only; no Python code modified.

Documentation

  • Documentation was updated where needed.
  • No documentation update was needed.

Scope

  • This pull request is focused on one feature or fix.
  • Tests were added or updated for functional changes.
  • Assumptions, risks, or follow-up work are described below.

Risks or follow-up

The guard matches on prefix chore: release, which aligns with the commit message format release-please produces. If the release-please commit message format ever changes, this guard would need updating.

Copilot AI linked an issue Aug 2, 2026 that may be closed by this pull request
@spmse

spmse commented Aug 2, 2026

Copy link
Copy Markdown
Owner

@copilot also see the workflow runs, e.g release workflow for release main (#64) which fails while building the docs etc

Copilot AI changed the title [WIP] Fix release please job trigger for specific commit messages fix: skip release-please job on chore release merge commits Aug 2, 2026
Copilot AI requested a review from spmse August 2, 2026 12:04

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot also see the workflow runs, e.g release workflow for release main (#64) which fails while building the docs etc

I investigated run #28 (chore: release main (#64)) in detail. There were two distinct failures:

  1. Spurious new PR opened after releasing – After creating the draft releases for PR chore: release main #64, release-please immediately ran its PR-creation phase. Because GitHub does not materialise git tags for draft releases, the tag core-v0.5.0 wasn't yet findable, so release-please treated all historical commits as unreleased and opened PR chore: release main #67.

  2. build-documentation / build-release-evidence checkout failure – Both jobs tried actions/checkout ref: core-v0.5.0, but (again) GitHub only creates the git tag when a draft release is published – gh release edit --draft=false happens at the end of build-release-evidence, too late for the initial checkout.

Fixed in commit fix: skip PR phase on release commits and use SHA for checkout:

  • skip-github-pull-request is now set to true whenever the push commit message starts with chore: release. Release-please still runs its release-creation phase (so draft releases and their eventual tags are created), but skips the PR-creation phase that was opening spurious follow-up PRs.
  • core_sha (the packages/core--sha output from release-please) is now exposed as a job output and used for both build-release-evidence and build-documentation checkouts. The commit SHA is always resolvable immediately; the git tag is only needed for uploading artifacts to the release, which happens after checkout.

@spmse
spmse marked this pull request as ready for review August 2, 2026 13:00
@spmse
spmse merged commit 3c00d1d into main Aug 2, 2026
5 checks passed
@spmse
spmse deleted the copilot/adjust-ci-release-trigger branch August 2, 2026 16:35
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.

Adjust Ci release please trigger

2 participants