Skip to content

リリースPR向けバージョンバンプワークフローを追加し、canary向けワークフローをリネーム - #5320

Merged
TinyKitten merged 2 commits into
devfrom
chore/bump-pr-actions
Feb 18, 2026
Merged

TinyKitten merged 2 commits into
devfrom
chore/bump-pr-actions

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Feb 18, 2026 •

Copy link
Copy Markdown
Member

Co-Authored-By: Claude Opus 4.6 [email protected]

Summary by CodeRabbit

  • 新機能

    • release/v* ブランチからのPRでアプリのセマンティックバージョンを自動決定・更新し、必要に応じてバージョンを増分するワークフローを追加しました。無効/古い/同等な指定はPRコメントで通知し、正常時はバージョン更新用のPRを作成してラベル付けします。
    • canary PRでビルド番号を自動的に増分するワークフローを追加しました。
  • ドキュメント

    • 両ワークフローの手順と挙動を説明するドキュメントを追加しました。

@TinyKitten TinyKitten self-assigned this Feb 18, 2026
@github-actions github-actions Bot added the ci/cd label Feb 18, 2026
@coderabbitai

coderabbitai Bot commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

リリース用ブランチ名(release/v*)からバージョンを抽出して現在の package.json と比較し、条件を満たす場合にバージョンを更新するPRを自動作成するGitHub Actionsワークフローと関連ドキュメントを追加しています。不正/古い/同一の場合はPRへコメントして停止します。

Changes

Cohort / File(s) Summary
リリースPRバージョンバンプワークフロー
.github/workflows/bump_version_on_release_pr.yml
release/v* で始まるPRをトリガーに、pnpm/Nodeをセットアップ、ブランチ名から目標バージョンを抽出・正規化・比較し、状態に応じてPRへコメントするかバージョンをバンプして新規PRを作成・ラベル付与するステップを追加。
ワークフロードキュメント
docs/bump-version-on-canary-pr.md, docs/bump-version-on-release-pr.md
canary/release用ワークフローのトリガー条件、バージョン正規化ルール、比較ロジック、エラー挙動、およびバージョン更新→PR作成の流れを説明するドキュメントを追加。

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub
    participant Actions as GitHub Actions
    participant Script as Version Resolver
    participant Creator as Create PR Action

    User->>GitHub: Open PR from release/v* branch
    GitHub->>Actions: Trigger workflow
    Actions->>Actions: Checkout & setup pnpm/Node
    Actions->>Script: Extract & resolve target version from branch name
    Script-->>Actions: Return status (invalid/older/same/ok) and target/current/resolved

    alt status == ok
        Actions->>Actions: Run version:bump script (updates package/build numbers)
        Actions->>Creator: Create version-bump PR (branch on head, labels)
        Creator-->>GitHub: PR created
        GitHub->>User: Notifies PR ready to merge
    else status in invalid/older/same
        Actions->>GitHub: Post comment on original PR (error/status)
        GitHub->>User: Comment visible on PR
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 リリース枝でぴょんと跳ねて、
ブランチ名から数字を見つけるよ〜📏
新しいバージョン、コツンと決まれば、
小さなPRが花を咲かせる、ぴょん!🌸

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、リリースPR向けのバージョンバンプワークフロー追加とcanary向けワークフローのリネームという変更内容を正確に反映しており、プルリクエストの主要な変更を明確に要約しています。
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 chore/bump-pr-actions

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

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

Inline comments:
In @.github/workflows/bump_version_on_release_pr.yml:
- Around line 85-93: When cmp === 0 and majors match the code currently builds
resolved using tMinor which can regress the minor version; change the resolution
to preserve the current minor (cMinor) instead of using tMinor so resolved
becomes tMajor + '.' + cMinor + '.' + (cPatch + 1). Update the logic around the
resolved variable in the same cmp === 0 branch (references: cmp, hasPatch,
tMajor, tMinor, cMinor, cPatch, resolved, target) so unspecified parts of the
version keep the current values rather than adopting target's minor.
- Around line 11-34: Replace all double-quoted YAML string literals with single
quotes to match .editorconfig rules: change env: TZ: "Asia/Tokyo" to TZ:
'Asia/Tokyo', change cache: "pnpm" to cache: 'pnpm', and any other double-quoted
strings such as the startsWith pattern (e.g., 'release/v') so all string values
use single quotes consistently; update the bump-version job block (look for keys
env/TZ, with/cache, and the startsWith condition) accordingly.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 @.github/workflows/bump_version_on_release_pr.yml:
- Around line 125-149: The PR notes that Fastlane lanes are out of sync with the
Node.js bump script: update ios/fastlane/Fastfile's bump_version lane so it
updates both CURRENT_PROJECT_VERSION and MARKETING_VERSION using the same
computed version (or call the existing scripts/bump-version.js and pass the
resolved version), and modify android/fastlane/Fastfile's bump_version lane to
stop using a hard-coded "+10" increment and instead compute/apply the semantic
version produced by the Node script (or accept the resolved version via
environment/parameter), ensuring both lanes use the same source of truth as the
pnpm run version:bump workflow.

@TinyKitten
TinyKitten merged commit 5afd276 into dev Feb 18, 2026
3 checks passed
@TinyKitten
TinyKitten deleted the chore/bump-pr-actions branch February 18, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant