Skip to content

aegoroff/releaser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,297 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Releaser

crates.io Rust codecov Minimum Stable Rust Version

A powerful command-line tool for automating the release process of Rust crates and workspaces on crates.io, with support for package manager formula generation.

Table of Contents

Features

  • πŸš€ Automated Version Management: Automatically increment versions for crates and workspaces
  • 🌐 Workspace Support: Handle complex workspace releases with dependency management
  • πŸ“¦ Package Manager Integration: Generate Homebrew formulas and Scoop manifests
  • πŸ”§ Flexible Publishing Options: Control publishing with various flags and options
  • ⏱️ Smart Delay Handling: Built-in delays between crate publications to ensure proper indexing
  • πŸ› οΈ Non-publish Mode: Change crate(s) verisions, commit and git without actually publishing to crates.io
  • πŸ“ Automatic Git Integration: Commit changes, create tags, and push to remote repositories
  • 🎨 Shell Completions: Generate autocompletion scripts for your shell

Installation

From crates.io (Recommended)

cargo install releaser

From Source

git clone https://github.com/aegoroff/releaser.git
cd releaser
cargo install --path .

Usage

Releaser provides several subcommands for different release scenarios:

Releasing a Workspace

Release all crates in a workspace with automatic version increment and dependency management:

# Release a workspace with minor version increment
releaser w minor /path/to/workspace

# Release with a 30-second delay between crate publications
releaser w patch /path/to/workspace -d 30

# Release without actually publishing to crates.io (dry run)
releaser w major /path/to/workspace --nopublish

Releasing a Single Crate

Release a single crate with version increment:

# Release a single crate with patch version increment
releaser c patch /path/to/crate

# Release with all features enabled
releaser c minor /path/to/crate -a

# Release without verification
releaser c major /path/to/crate -n

Package Manager Formula Generation

Generate package manager formulas for distributing your binaries:

Homebrew Formula (macOS/Linux)

# Generate a Homebrew formula
releaser b \
  --crate /path/to/crate \
  --linux /path/to/linux/binary \
  --macos /path/to/macos/binary \
  --base https://github.com/user/repo/releases/download/vX.Y.Z

Scoop Manifest (Windows)

# Generate a Scoop manifest
releaser s \
  --crate /path/to/crate \
  --binary /path/to/windows/binary \
  --exe myapp.exe \
  --base https://github.com/user/repo/releases/download/vX.Y.Z

Command Reference

releaser w - Release Workspace

Release all crates in a workspace.

releaser w [OPTIONS] <INCR> <PATH>

Arguments:

  • <INCR>: Version increment. One of: major, minor, or patch
  • <PATH>: Path to the workspace root

Options:

  • -d, --delay <NUMBER>: Delay in seconds between publishing crates (default: 20)
  • -a, --all: Enable all features when publishing
  • -n, --noverify: Skip verification when publishing
  • --nopublish: Skip publishing, only update versions and Git operations

releaser c - Release Crate

Release a single crate.

releaser c [OPTIONS] <INCR> <PATH>

Arguments:

  • <INCR>: Version increment. One of: major, minor, or patch
  • <PATH>: Path to the crate root

Options:

  • -a, --all: Enable all features when publishing
  • -n, --noverify: Skip verification when publishing
  • --nopublish: Skip publishing, only update versions and Git operations

releaser b - Generate Homebrew Formula

Create a Homebrew formula for macOS and Linux packages.

releaser b [OPTIONS] --crate <PATH> --base <URI>

Options:

  • -c, --crate <PATH>: Path to the crate where Cargo.toml is located
  • -l, --linux <PATH>: Path to the Linux package directory
  • -m, --macos <PATH>: Path to the macOS x64 package directory
  • -a, --macosarm <PATH>: Path to the macOS ARM64 package directory
  • -b, --base <URI>: Base URI for downloaded artifacts
  • -u, --output [<PATH>]: File path to save result (stdout if not set)

releaser s - Generate Scoop Manifest

Create a Scoop manifest for Windows packages.

releaser s [OPTIONS] --crate <PATH> --binary <PATH> --exe <FILE> --base <URI>

Options:

  • -c, --crate <PATH>: Path to the crate where Cargo.toml is located
  • -i, --binary <PATH>: Path to the 64-bit binary package directory
  • -e, --exe <FILE>: Windows executable name
  • -b, --base <URI>: Base URI for downloaded artifacts
  • -u, --output [<PATH>]: File path to save result (stdout if not set)

releaser completion - Generate Shell Completions

Generate autocompletion scripts for your shell.

releaser completion <SHELL>

Supported shells: bash, elvish, fish, powershell, zsh

releaser bugreport - Generate Bug Report

Collect system information for bug reports.

releaser bugreport

Examples

Workspace Release Workflow

# 1. Release a workspace with minor version increment
releaser w minor /path/to/my/workspace

# 2. Release with custom delay and all features
releaser w patch /path/to/my/workspace -d 60 -a

# 3. Test release without publishing
releaser w major /path/to/my/workspace --nopublish

Single Crate Release

# Release a single crate with patch increment
releaser c patch /path/to/my/crate

# Release with all features and no verification
releaser c minor /path/to/my/crate -a -n

Package Manager Integration

# Generate Homebrew formula
releaser b \
  --crate ./my-app \
  --linux ./artifacts/linux \
  --macos ./artifacts/macos \
  --base https://github.com/user/my-app/releases/download/v1.0.0 \
  --output my-app.rb

# Generate Scoop manifest
releaser s \
  --crate ./my-app \
  --binary ./artifacts/windows \
  --exe my-app.exe \
  --base https://github.com/user/my-app/releases/download/v1.0.0 \
  --output my-app.json

Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Make your changes and write tests
  4. Ensure all tests pass with cargo test
  5. Submit a pull request with a clear description of your changes

Development Setup

# Clone the repository
git clone https://github.com/aegoroff/releaser.git
cd releaser

# Run tests
cargo test

# Build the project
cargo build

# Install from source
cargo install --path .

Code Style

This project uses rustfmt for code formatting. Please ensure your code is properly formatted:

cargo fmt

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Copyright (c) 2021-2026 Alexander Egorov

Related Projects

About

Rust releasing workspace tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages