Skip to content

feat: integrate release-plz with git-cliff for automated changelog generation#4

Merged
km-tr merged 6 commits intomainfrom
feat/release-plz
Feb 24, 2026
Merged

feat: integrate release-plz with git-cliff for automated changelog generation#4
km-tr merged 6 commits intomainfrom
feat/release-plz

Conversation

@km-tr
Copy link
Copy Markdown
Owner

@km-tr km-tr commented Feb 24, 2026

Summary

  • release-plzの設定を追加し、バージョン管理とchangelog生成を自動化
  • GitHub Actionsワークフローでリリース PRとgitタグの管理を自動化
  • AGENTS.md/CLAUDE.mdにPRガイドライン(Conventional Commits形式)を追加

Configuration

  • release-plz.toml: 最小構成(git_release_enable=false、cargo-distがGitHub Releaseを担当)
  • .github/workflows/release-plz.yml: 2つのジョブ
    • release-plz-pr: バージョンバンプ + CHANGELOG更新のPRを自動作成
    • release-plz-release: マージ後にgitタグを作成(PATでcargo-distをトリガー)
  • AGENTS.md: PRタイトルのConventional Commits形式ガイドライン
  • CLAUDE.md: AGENTS.mdへのシンボリックリンク

Release workflow

  1. mainにPRマージ → release-plz-prが次バージョンを検出
  2. バージョンバンプ + CHANGELOG更新のPRを自動作成
  3. レビュー後マージ
  4. release-plz-releaseがgitタグを作成(v0.x.x)
  5. タグpush → cargo-dist release.yml → バイナリビルド、GitHub Release作成、Homebrew formula公開

Required secrets

Secret 用途
GH_TOKEN release-plzのタグ作成(PATが必要、GITHUB_TOKENでは他ワークフローをトリガーできない)

Test plan

  • ワークフローがmain pushで実行されることを確認
  • リリースPRのchangelog生成を確認
  • タグ作成でcargo-distがトリガーされることを確認

🤖 Generated with AI

…neration

Add release-plz configuration with conventional commits parsing for changelog generation. The workflow creates version bump + changelog PRs on main, and publishes git tags on merge (delegating GitHub Release creation to cargo-dist).

🤖 Generated with AI
Copilot AI review requested due to automatic review settings February 24, 2026 11:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2026

Warning

Rate limit exceeded

@km-tr has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between e9b1fe6 and 02a39fd.

⛔ Files ignored due to path filters (1)
  • .github/workflows/release-plz.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • AGENTS.md

Walkthrough

AIエージェント向けの新しいドキュメンテーションファイル(AGENTS.md)を追加しました。このファイルにはPRワークフロー、スクワッシュマージポリシー、PR タイトル形式、および受け入れ可能な変更タイプ(feat、fix、docs、refactor、test、chore)の定義が含まれています。

Changes

Cohort / File(s) Summary
Documentation Guidelines
AGENTS.md, CLAUDE.md
AIエージェント向けのPRワークフロー手順、スクワッシュマージポリシー、PR タイトルフォーマット、および変更タイプの分類と例を記載した新規ドキュメント。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 ウサギがドキュメント増やしたよ、
AIエージェントたちのための地図を、
スクワッシュとタイトル、型をそろえて、
プルリクの流れがスムーズになるね!✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions 'release-plz' and 'automated changelog generation', but the actual changes only add AGENTS.md and CLAUDE.md files with PR guidelines, not the release-plz integration described in the title. Update the title to reflect the actual changes, such as 'docs: add AGENTS.md and CLAUDE.md with PR guidelines' or verify that release-plz and workflow files are included in the changeset.
Description check ⚠️ Warning The description discusses release-plz integration, GitHub Actions workflows, and release configuration, but the actual changeset only contains AGENTS.md and CLAUDE.md files with PR guidelines. Align the description with the actual changes in the PR, or include all mentioned files (release-plz.toml, .github/workflows/release-plz.yml) in the changeset.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/release-plz

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

GITHUB_TOKEN cannot trigger other workflows (GitHub loop prevention). A PAT (RELEASE_PLZ_TOKEN) is required so that the tag push triggers cargo-dist release.yml.

🤖 Generated with AI
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9b1fe69ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Around line 11-13: The fenced code blocks in AGENTS.md are missing language
specifiers (MD040); update each triple-backtick block shown (the one around the
"<type>: <description>" example and the commit-list block later) to include a
language label such as "text" (i.e., change ``` to ```text) so markdownlint no
longer flags MD040 and the blocks render/read more clearly; ensure both the
block at the example (around "<type>: <description>") and the block containing
the commit lines ("feat: add wtl short alias..." through "chore: add dist
profile...") are updated.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c36dac and e9b1fe6.

⛔ Files ignored due to path filters (2)
  • .github/workflows/release-plz.yml is excluded by !**/*.yml
  • release-plz.toml is excluded by !**/*.toml
📒 Files selected for processing (2)
  • AGENTS.md
  • CLAUDE.md

Comment on lines +11 to +13
```
<type>: <description>
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

フェンスコードに言語指定を追加してください(MD040)

markdownlint の警告対象です。言語指定を付けると読みやすさも上がります。

💡 修正案(language 指定の追加)
-```
+```text
 <type>: <description>
-```
+```

-```
+```text
 feat: add wtl short alias via bin-aliases
 fix: canonicalize symlink targets before prefix matching
 docs: update Homebrew installation instructions
 chore: add dist profile with thin LTO
-```
+```

Also applies to: 26-31

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 11-11: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 11 - 13, The fenced code blocks in AGENTS.md are
missing language specifiers (MD040); update each triple-backtick block shown
(the one around the "<type>: <description>" example and the commit-list block
later) to include a language label such as "text" (i.e., change ``` to ```text)
so markdownlint no longer flags MD040 and the blocks render/read more clearly;
ensure both the block at the example (around "<type>: <description>") and the
block containing the commit lines ("feat: add wtl short alias..." through
"chore: add dist profile...") are updated.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces automated release management through release-plz, which handles version bumping and changelog generation based on conventional commits. The workflow integrates with the existing cargo-dist setup to create a complete CI/CD pipeline where release-plz manages versioning and tagging, while cargo-dist handles binary distribution.

Changes:

  • Added release-plz configuration disabling GitHub releases and crates.io publishing (delegated to cargo-dist)
  • Created GitHub Actions workflow with two jobs: one to create/update release PRs with version bumps and changelogs, another to create git tags when merged
  • Added PR guidelines documentation specifying conventional commit format for AI agents and contributors

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
release-plz.toml Configures release-plz to skip GitHub releases and crates.io publishing, letting cargo-dist handle distribution
.github/workflows/release-plz.yml Defines two-job workflow: create/update release PRs on main pushes, and create tags when version changes are merged
AGENTS.md Documents PR title conventions using conventional commits for changelog generation
CLAUDE.md Intended to be a symlink to AGENTS.md for Claude AI agent accessibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +9 to +27
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
# PAT is required so that the created tag triggers cargo-dist's release.yml.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow has both jobs running on every push to main, which could cause race conditions. The 'release-plz-release' job will attempt to create git tags whenever version changes are detected in Cargo.toml, but it will also run when the release PR is merged (which updates Cargo.toml). Meanwhile, 'release-plz-pr' might try to update the release PR. Consider adding conditions to ensure 'release-plz-release' only runs when it's not a release-plz bot commit, or restructure so these jobs don't interfere. For example, 'release-plz-release' could skip if the commit message starts with 'chore(release)' or similar pattern that release-plz uses.

Copilot uses AI. Check for mistakes.
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an inconsistency in the checkout action versions across workflows. The release-plz workflow uses 'actions/checkout@v6' while the existing CI workflow uses 'actions/checkout@v4'. This inconsistency could lead to confusion and makes maintenance harder. Consider using the same version across all workflows for consistency, preferably v6 if it's the latest stable version being adopted.

Copilot uses AI. Check for mistakes.
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow sets 'persist-credentials: false' in the checkout step but then uses the GITHUB_TOKEN in the release-plz action. The 'persist-credentials: false' setting prevents the checkout action from persisting credentials for subsequent git operations, which could interfere with release-plz's ability to create commits, tags, or push changes. Since release-plz needs to perform git operations, consider removing 'persist-credentials: false' or ensure release-plz is configured to use the GITHUB_TOKEN for all git operations. Verify that release-plz action handles this correctly.

Copilot uses AI. Check for mistakes.
AGENTS.md Outdated
Comment on lines +15 to +22
Types:

- `feat` — New feature
- `fix` — Bug fix
- `docs` — Documentation only
- `refactor` — Code restructuring without behavior change
- `test` — Adding or updating tests
- `chore` — Maintenance, tooling, CI, dependencies
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conventional commit types listed are missing some standard types that are commonly used and might be relevant for this project. Consider adding:

  • 'perf' for performance improvements
  • 'style' for code style changes (formatting, missing semicolons, etc.)
  • 'ci' for CI/CD changes (could replace or supplement 'chore' for workflow-specific changes)
  • 'build' for build system changes

This would provide more granular control over changelog generation and better semantic meaning for different types of changes.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +51
name: Release-plz

on:
push:
branches:
- main

jobs:
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
# PAT is required so that the created tag triggers cargo-dist's release.yml.
# GITHUB_TOKEN cannot trigger other workflows (GitHub's loop prevention).
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}

release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release-pr
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions a test plan with checkboxes, but all items are unchecked. Before merging this PR, consider:

  1. Testing the workflow on a non-main branch first
  2. Verifying that release-plz correctly parses conventional commits
  3. Confirming the interaction between release-plz tag creation and cargo-dist release triggering
  4. Ensuring the draft PR creation works as expected

Consider running these tests or documenting why they're not needed before merge.

Copilot uses AI. Check for mistakes.
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release-plz action is pinned to a minor version (@v0.5) rather than a specific SHA or patch version. While this allows automatic updates to patch versions, it could introduce unexpected changes. For better reproducibility and security, consider either:

  1. Pinning to a specific patch version and SHA (e.g., release-plz/action@v0.5.X with SHA)
  2. Using Dependabot or Renovate to automatically update pinned versions

This is especially important for release workflows where unexpected behavior could disrupt the release process.

Copilot uses AI. Check for mistakes.
@km-tr km-tr self-assigned this Feb 24, 2026
@km-tr km-tr marked this pull request as draft February 24, 2026 11:25
@km-tr km-tr marked this pull request as ready for review February 24, 2026 11:25
@km-tr km-tr merged commit 898141c into main Feb 24, 2026
10 checks passed
@github-actions github-actions bot mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants