Skip to main content

release-pr

The release-plz release-pr command runs release-plz update and opens a GitHub Pull Request that prepares the next release.

When the project maintainer merges the release pull request, the packages are ready to be published.

Here's an example of a PR opened by release-plz in the release-plz GitHub project itself.

In the following example, I run release-plz on the release-plz project itself. Release-plz opens a PR that increases the version and the changelog of the packages with unpublished changes.

release-plz release-pr

To learn more, run release-plz release-pr --help.

PR update

If there's already an open release PR:

  • If the PR contains commits that are not from bots (except the first one), release-plz closes the PR to preserve the git history. The update mechanism is simple: overwrite everything and force-push. 💥 Reasoning: changes done by bots are not valuable, so we can overwrite them. (Not available on Gitea).
  • Otherwise, release-plz closes the old PR and opens a new one. This is done to preserve the git history of maintainers' changes. Release-plz also closes the release PR when it cannot update it (for example, the force-push fails due to merge conflicts).
info

release-plz release-pr -p <package> doesn't open a PR per package. Instead, release-plz overrides the existing release PR with the changes of the specified package.

Gitea

release-plz release-pr also supports creating PRs for repositories hosted on Gitea with the --backend flag:

release-plz release-pr --git-token <gitea application token> --backend gitea

Github

On Github, the release-plz release-pr will use your --git-token to create a commit through the GraphQL API rather than making a commit locally and pushing the changes. This allows having a Verified commit without specifying a GPG signature.