Repository navigation
AndroidビルドワークフローにGoogle Play内部テストトラックへのAABアップロードを追加 - #6456
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Neduxzhi9hrAqNnJRa4pAQ
📝 WalkthroughWalkthroughAndroid ビルドワークフローに、手動実行時の Google Play アップロード制御、バリアント別パッケージ名の出力、AAB とマッピングファイルの内部トラック送信を追加しました。 ChangesAndroid Play Store アップロード
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHubActions
participant BuildVars
participant GooglePlay
Developer->>GitHubActions: 手動実行と upload_to_play を指定
GitHubActions->>BuildVars: 入力値とビルドバリアントを渡す
BuildVars->>GitHubActions: パッケージ名とアップロード可否を出力
GitHubActions->>GooglePlay: 有効時に AAB とマッピングファイルを内部トラックへアップロード
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8).github/workflows/build_android.ymlTraceback (most recent call last): Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/build_android.yml (2)
183-183: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPlay のサービスアカウントを扱う action を commit SHA に固定してください。
@v1.1.3はタグ参照です。第三者 action はレビュー済みの完全な commit SHA に固定し、更新時だけ意図的に変更してください。GitHub も SHA 固定を immutable release の安全策として推奨しています。 (docs.github.com)Based on learnings from GitHub secure-use guidance: secret を扱う第三者 action は immutable な参照を使用します。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build_android.yml at line 183, Update the third-party action reference in the build workflow to use the reviewed full commit SHA instead of the mutable r0adkll/upload-google-play v1.1.3 tag, preserving the existing action and configuration.Source: MCP tools
18-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win手動 dry-run と Play Console の前提条件を文書化してください。
upload_to_play=falseを指定する手動実行が dry-run の手順になること、PLAY_SERVICE_ACCOUNT_JSON、サービスアカウント権限、初回 AAB 登録、prodReleaseの master 制約を README または workflow コメントに明記してください。push 時は常にアップロードされる点も記載が必要です。As per coding guidelines: workflow 更新では dry-run 手順、前提条件、secret、環境変数、サービスアカウントを文書化します。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build_android.yml around lines 18 - 22, Document the Android workflow prerequisites and usage near upload_to_play: explain that manual runs with upload_to_play=false are the dry-run procedure, while push-triggered runs always upload; also document PLAY_SERVICE_ACCOUNT_JSON, required service-account permissions, initial AAB registration, and the prodRelease master-branch restriction.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build_android.yml:
- Around line 181-190: Update the Android build workflow around the Google Play
upload step and its preceding Gradle build configuration so each push injects a
package-specific, monotonically increasing versionCode instead of relying on the
fixed dev/prod value 100000542. Ensure both flavors receive the generated
versionCode during the build, and preserve the upload’s packageName and release
artifact flow.
---
Nitpick comments:
In @.github/workflows/build_android.yml:
- Line 183: Update the third-party action reference in the build workflow to use
the reviewed full commit SHA instead of the mutable r0adkll/upload-google-play
v1.1.3 tag, preserving the existing action and configuration.
- Around line 18-22: Document the Android workflow prerequisites and usage near
upload_to_play: explain that manual runs with upload_to_play=false are the
dry-run procedure, while push-triggered runs always upload; also document
PLAY_SERVICE_ACCOUNT_JSON, required service-account permissions, initial AAB
registration, and the prodRelease master-branch restriction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d2b9f8cc-8328-4bc4-b6f9-6677014f94e5
📒 Files selected for processing (1)
.github/workflows/build_android.yml
概要
build_android.ymlがAABのビルドとArtifactアップロードで止まっており、Google Playへの提出が手作業だったため、ビルド後にGoogle Play内部テストトラックへ自動アップロードするステップを追加しました。変更の種類
変更内容
r0adkll/[email protected]でAABをGoogle Playの内部テスト(internal)トラックへアップロードするステップを追加mapping.txtも同時にアップロードし、Play Consoleでのクラッシュレポート復号に対応build_varsステップでvariantに応じたパッケージ名を出力(prodRelease→me.tinykitten.trainlcd/devRelease→me.tinykitten.trainlcd.dev)workflow_dispatchにupload_to_play入力(既定true)を追加し、手動実行時にビルドのみの運用も可能に(push トリガーでは常にアップロード)必要なセットアップ
PLAY_SERVICE_ACCOUNT_JSONの登録が必要です(Google CloudサービスアカウントのJSONキー)。Play Console側で該当サービスアカウントを招待し、両アプリに対してテストトラックへのリリース権限を付与してください。設計判断
prodReleaseもproductionトラックへの直接公開ではなくinternalトラックへのアップロードとし、ストア公開はPlay Console上でのトラック昇格で行う運用を想定しています。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること省略: アプリコードの変更なし(CIワークフローのみ)。YAML構文チェック(
python3 -c "import yaml; ...")は実施済み。実際のアップロード動作はシークレット登録後のworkflow_dispatch実行での確認が必要です。関連Issue
スクリーンショット(任意)
Summary by CodeRabbit