Skip to content

chore: configure semantic-release to create PR instead of direct push - #14

Merged
baleen37 merged 1 commit into
mainfrom
chore/semantic-release-pr-workflow
Jan 22, 2026
Merged

chore: configure semantic-release to create PR instead of direct push#14
baleen37 merged 1 commit into
mainfrom
chore/semantic-release-pr-workflow

Conversation

@baleen37

@baleen37 baleen37 commented Jan 22, 2026

Copy link
Copy Markdown
Owner

Summary

Configure semantic-release to create a PR for releases instead of pushing directly to main, avoiding protected branch violations.

Changes

  • Set branches: ['release'] in .releaserc.js
  • Update release.yml workflow to:
    • Run semantic-release on release branch
    • Push release branch and create PR
    • Disable success/fail comments

Context

Previously semantic-release tried to push directly to main, which failed due to branch protection rules requiring PRs.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated release workflow automation with improved error handling and conditional branch creation.
    • Optimized GitHub integration configuration for streamlined release coordination and reduced notification behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

- Configure semantic-release to use 'release' branch
- Update workflow to push release branch and create PR
- Disable success/fail comments on PR
- This avoids protected branch violations on main

Co-Authored-By: Claude <noreply@anthropic.com>
@baleen37
baleen37 enabled auto-merge January 22, 2026 05:53
@coderabbitai

coderabbitai Bot commented Jan 22, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The release workflow has been enhanced to explicitly configure semantic-release with a designated release branch, suppress GitHub plugin comments, and implement a multi-step process that sets git credentials, executes semantic-release, and automatically creates pull requests when new releases are generated.

Changes

Cohort / File(s) Summary
Release Configuration
.github/workflows/release.yml
Added multi-step release process: explicit git configuration (user.name, user.email), semantic-release execution with --branches release flag and failure handling, and conditional logic to push release branch and create pull request against main when release is created
Release Configuration
.releaserc.js
Modified GitHub plugin configuration from string entry to object with successComment: false and failComment: false; added explicit branches: ['release'] to default export configuration

Sequence Diagram(s)

sequenceDiagram
    participant GHA as GitHub Actions<br/>Workflow
    participant SR as semantic-release
    participant Git as Git Repository
    participant GH as GitHub API

    GHA->>GHA: Set git user.name & user.email
    GHA->>SR: Execute semantic-release<br/>(--branches release)
    alt Release Created
        SR->>Git: Create release branch
        Git-->>GHA: Branch created signal
        GHA->>Git: Push release branch to origin
        GHA->>GH: Create PR against main<br/>(with RELEASE_VERSION)
    else No Release Needed
        SR-->>GHA: Echo "No release needed"
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Suggested labels

released

Poem

🐰 A release workflow takes flight,
With branches configured just right,
Semantic versioning flows,
As the rabbit well knows,
Creating PRs—pure delight!

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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