gitmyhub

release-please

TypeScript ★ 7.1k updated 2d ago

generate release PRs based on the conventionalcommits.org spec

Release Please is a tool from Google that automates the repetitive parts of releasing new software versions on GitHub. Instead of manually updating changelogs, deciding version numbers, and tagging releases, the tool does this automatically by reading your commit history and following a standard message format called Conventional Commits.

The core idea is that commits use short prefixes to signal what kind of change they contain. A commit starting with "fix:" means a bug was fixed. One starting with "feat:" means a new feature was added. Adding an exclamation mark to either ("feat!:" or "fix!:") signals that something broke backwards compatibility. Release Please reads those prefixes to decide what kind of version bump is needed according to semantic versioning rules: patches for fixes, minor bumps for new features, and major bumps for breaking changes.

Rather than releasing immediately when code lands, Release Please opens a draft release pull request on GitHub and keeps updating it as more commits come in. When you are satisfied with what is queued up, you merge that pull request. The merge triggers the tool to update your changelog file, tag the commit in git, and create a formal GitHub Release. The tool deliberately does not publish packages to npm, PyPI, or any other registry, so a separate step or tool handles that part.

Release Please supports many language ecosystems, including Node.js, Python, Java, Go, Ruby, Rust, PHP, and several others. Each ecosystem has a strategy for which files to update at release time. For Node.js projects this means bumping the version in package.json; for Go modules it means updating module files.

The recommended way to use it is as a GitHub Actions workflow that runs automatically on merges to the main branch. A GitHub App option also exists for organizations that prefer not to manage workflow files manually.