Skip to content

librarian: [release] Implement release tag-and-release Command #1009

@bisun-google

Description

@bisun-google

Build the CLI for the release tag-and-release subcommand, including the logic to find merged PRs, create Git tags, create GitHub Releases, and update PR labels.

A release commit message structure depends on the tagging strategy configured for the repository.

Tag Per Repo

In this strategy, a single release pull request results in one release tag for the entire repository, which is suitable for languages like Java and C++. The Librarian will determine the version and other variables to fill in the template.

chore(main): release {version}

Librarian Version: {librarian_version}
Language Image: {language_image_name_and_digest}

<details><summary>{version}</summary>

[<version>](https://github.com/googleapis/{repo}/compare/{previous_tag}...{new_tag}) ({date})

### Features

* {commit_summary} ([{commit_hash}](https://github.com/googleapis/{repo}/commit/{commit_hash}))

### Bug Fixes

* {commit_summary} ([{commit_hash}](https://github.com/googleapis/{repo}/commit/{commit_hash}))

### Documentation

* {commit_summary} ([{commit_hash}](https://github.com/googleapis/{repo}/commit/{commit_hash}))

</details>

Tag Per Library

In this strategy, a single release pull request can generate multiple, distinct tags, one for each library that has changed. This approach is used by languages like Python and Go. A section for each library release will be wrapped into a <details> element, where the <summary> child element will contain the release tag.

chore: release main

Librarian Version: {librarian_version}
Language Image: {language_image_name_and_digest}

<details><summary>{library_name}: {version}</summary>

[{version}](https://github.com/googleapis/{repo}/compare/{library_name}-v{previous_version}...{library_name}-v{new_version}) ({date})

### Features

* {commit_summary} ([{commit_hash}](https://github.com/googleapis/{repo}/commit/{commit_hash}))

</details>

<details><summary>{another_library_name}: {version}</summary>

[{version}](https://github.com/googleapis/{repo}/compare/{another_library_name}-v<previous_version>...{another_library_name}-v{new_version}) ({date})

### Bug Fixes

* {commit_summary} ([{commit_hash}](https://github.com/googleapis/{repo}/commit/{commit_hash}))

</details>

Librarian will parse the commit message and create a separate release tag for each <details> section.

In addition to creating a release tag per library, Librarian will create a release-please-{PR number} tag that is used for triggering a Louhi release flow that releases multiple libraries at once.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions