Skip to content

ci: automate releases with release-please (GitHub App token) - #45

Merged
MRyutaro merged 2 commits into
mainfrom
ci/release-please
Jun 14, 2026
Merged

MRyutaro merged 2 commits into
mainfrom
ci/release-please

Conversation

@MRyutaro

Copy link
Copy Markdown
Owner

概要

リリースを release-please で自動化します。main へのマージ内容(Conventional Commits)からバージョンを判定し、pyproject.toml の更新と CHANGELOG.md をまとめたリリースPRを bot が自動作成します。そのリリースPRをマージすると v{version} タグ + GitHub Release が作られ、既存の publish-to-pypi.yml / docker-publish.yml(タグ起動)が発火して PyPI / GHCR へ公開されます。

main にマージ (feat:/fix:/feat!: …)
   ↓ (bot)
リリースPR: バージョン更新 + CHANGELOG
   ↓ (マージ)
v{version} タグ + GitHub Release
   ↓ (既存CI)
PyPI + GHCR

バンプ判定(コミット種別で自動)

  • fix: → patch
  • feat: → minor
  • feat!: / 本文 BREAKING CHANGE: → major
  • 強制したい場合は本文に Release-As: x.y.z

変更内容

  • release-please-config.json — python release-type、タグは v{version} 形式
  • .release-please-manifest.json — 現行バージョン 0.0.28 をシード
  • .github/workflows/release-please.yml — main への push で実行
  • CLAUDE.md — 新フローとバンプ規則を記載(bump-my-version は手動フォールバックとして存置)

前提(設定済み)

GITHUB_TOKEN で作ったタグは他ワークフローを起動できないため、GitHub App トークンでタグを打ちます。actions/create-github-app-token が実行時にトークンを発行します。必要な Secret はリポジトリに登録済み:

  • RELEASE_PLEASE_APP_ID
  • RELEASE_PLEASE_APP_PRIVATE_KEY

App 権限: Contents read/write、Pull requests read/write。

🤖 Generated with Claude Code

MRyutaro and others added 2 commits June 15, 2026 01:02
Add release-please to derive the next version from Conventional Commits,
maintain CHANGELOG.md, and open a release PR. Merging that PR tags
v{version} and creates a GitHub Release, which triggers the existing
PyPI / GHCR publish workflows.

- release-please-config.json: python release-type, tags as v{version}
- .release-please-manifest.json: seeds current version 0.0.28
- release-please.yml: runs on push to main; uses RELEASE_PLEASE_TOKEN
  (PAT/App) so the created tag can trigger downstream publish workflows
- CLAUDE.md: document the new flow and fix/feat/breaking bump rules;
  keep bump-my-version as a manual fallback

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Issue an App token at runtime via actions/create-github-app-token so the
tag release-please creates can trigger the PyPI/GHCR publish workflows
(GITHUB_TOKEN-created tags cannot trigger other workflows). Requires the
RELEASE_PLEASE_APP_ID and RELEASE_PLEASE_APP_PRIVATE_KEY secrets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MRyutaro
MRyutaro merged commit b362a14 into main Jun 14, 2026
2 checks passed
@MRyutaro
MRyutaro deleted the ci/release-please branch June 14, 2026 16:11
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.

1 participant