Skip to content

pvandervelde/release_regent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

182 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Release Regent

License: Apache 2.0 Build Status Rust

Overview

Release Regent automates the release process for projects using conventional commits. It handles semantic versioning, changelog generation, and GitHub release creation through a two-phase workflow triggered by pull request merges.

What Release Regent Does

When you merge a regular pull request, Release Regent creates or updates a release PR with a calculated semantic version and generated changelog. When you merge that release PR, it creates a GitHub release with proper tags and release notes.

The tool uses conventional commit analysis to determine version bumps and handles version conflicts by never downgrading existing release PRs. Templates allow customization of release PR titles, bodies, and changelog formatting.

How It Works

Release Regent implements a two-phase automated release workflow:

Phase 1: Release PR Management

When a regular pull request is merged to your main branch:

  1. Webhook Processing: Release Regent receives the merge event
  2. Version Calculation: Analyzes commits since the last release using conventional commit standards
  3. Release PR Creation: Creates or updates a release PR with the calculated version and generated changelog
  4. Smart Updates: If a release PR already exists, intelligently updates it based on version comparison

Phase 2: Release Creation

When a release PR is merged:

  1. Release Detection: Automatically detects merged release PRs by branch pattern
  2. GitHub Release Creation: Creates a GitHub release with proper Git tags pointing to the merge commit
  3. Release Notes: Uses the accumulated changelog from the release PR as release notes
  4. Cleanup: Removes the release branch after successful release creation

Core Components

  • CLI Tool: Local development and testing of release workflows
  • Webhook Server Integration: Webhook-based automation for GitHub repositories
  • GitHub API Client: Handles all GitHub interactions with proper authentication and rate limiting
  • Configuration System: Template-based customization of release PRs and changelog formatting

Getting Started

For New Users

For Existing Users

Understanding Release Regent

Quick Start

CLI Installation

# Install from source
cargo install --git https://github.com/pvandervelde/release_regent.git release-regent-cli

# Test installation
rr --version

Basic Usage

# Calculate next version from commits
rr version --current 1.2.0

# Generate changelog for a version
rr changelog --version 1.3.0

# Test complete workflow locally
rr test-workflow --dry-run

For complete setup instructions, see the Getting Started Guide.

Architecture

Release Regent uses a multi-crate workspace architecture designed for modularity and deployment flexibility:

release_regent/
β”œβ”€β”€ crates/
β”‚   β”œβ”€β”€ core/           # Core logic and workflows
β”‚   β”œβ”€β”€ cli/            # Command-line interface
β”‚   β”œβ”€β”€ server/         # HTTP web server runtime
β”‚   └── github_client/  # GitHub API integration
└── docs/               # Documentation

Component Relationships

Core Engine (release-regent-core): Contains the release orchestration logic, version calculation algorithms, and configuration management. This is where the main workflow intelligence resides.

CLI Tool (release-regent-cli): Published - Provides local testing capabilities and development workflow integration. Essential for validating configurations and testing release logic.

Server (release-regent-server): Published - Webhook processor that connects GitHub events to the core release workflows. Handles authentication, signature validation, and async processing.

GitHub Client (release-regent-github-client): Internal API client that handles all GitHub interactions with proper rate limiting, retry logic, and error handling.

Publication Model: Only the CLI tool and server binary are published for end users. The core and GitHub client components are internal implementation details that ensure clean separation of concerns.

Configuration Example

Release Regent uses template-based configuration to customize the automated workflow:

[release_pr]
# Template for release PR titles
title_template = "chore(release): prepare version {version}"

# Template for release PR bodies
body_template = """
## Release {version}

### Changes

{changelog}

### Commits
- {commit_count} commits since last release
- Generated on {date}
"""

[versioning]
prefix = "v"           # Creates tags like "v1.2.3"
allow_prerelease = true

[repository]
main_branch = "main"
release_branch_pattern = "release/v{version}"

Template Variables Available:

  • {version} - Calculated semantic version (e.g., "1.2.3")
  • {version_tag} - Version with prefix (e.g., "v1.2.3")
  • {changelog} - Generated changelog content
  • {commit_count} - Number of commits since last release
  • {date} - Current date in ISO format

See Configuration Reference for complete options.

Current Status & Roadmap

Release Regent is in active development implementing the complete automation workflow:

βœ… Completed (v0.2-0.3)

  • Core version calculation with conventional commits
  • CLI tool with basic workflows
  • GitHub API client migrated to github-bot-sdk
  • Trait-based architecture with GitOperations and GitHubOperations
  • Configuration system foundation
  • Azure Key Vault integration for secrets

πŸ”„ In Progress (v0.3-0.4)

  • Release PR Management: Automated PR creation and updates
  • Release Automation: GitHub release creation from merged release PRs
  • Webhook Processing: Complete HTTP server integration
  • Template System: Full customization capabilities

🎯 Upcoming (v1.0)

  • Complete documentation and guides
  • Production deployment templates
  • Comprehensive error handling and monitoring
  • CLI tool publication to crates.io

Target Timeline: Version 1.0 planned for Q3 2025

Contributing

Release Regent welcomes contributions and follows standard Rust development practices:

Development Setup

# Clone and build
git clone https://github.com/pvandervelde/release_regent.git
cd release_regent
cargo build --workspace

# Run tests
cargo test --workspace

# Format and lint
cargo fmt && cargo clippy

Contributing Guidelines

  • Use conventional commit format for all commits
  • Maintain test coverage above 90%
  • Update documentation for new features
  • All pull requests require CI/CD checks to pass

For detailed contribution guidelines, see CONTRIBUTING.md.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Made with Rust | Semantic Versioning | Conventional Commits

About

Release_Regent is a GitHub app that automates your release management process. It handles versioning, release pull requests, and GitHub releases - ruling over your software delivery process with precision and reliability.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages