android-cicd
できること
このスキルは、変更のたびにAndroidアプリをビルドしてGoogle Playへ送信する、繰り返し可能なパイプラインを設定します。Androidアプリを公開し、リリースを手作業で行うのをやめたい開発者に向けたものです。
使う場面
- ✓メインブランチへのpushのたびに、Androidアプリがビルドされて公開されるようにしたいとき。
- ✓Androidアプリに自動のビルドやリリースのパイプラインがまだないとき。
- ✓内部、アルファ、ベータ、本番といったGoogle Playのリリース段階を自動で扱いたいとき。
スキルのリンク
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/android-cicd/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“GitHubにpushするたびに、AndroidアプリがGoogle Playへ自動的に公開されるように設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、プロジェクトフォルダでセットアップのウィザードを実行します。ウィザードはアプリの種類を確認し、署名キーを作成し、シークレットをGitHubに保存して、公開を行うワークフローファイルを書きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Skill: android-cicd
Purpose
Set up a complete, multi-stage Android CI/CD pipeline that automatically builds and publishes to Google Play via GitHub Actions. Supports TWA (Trusted Web Activity / Bubblewrap), React Native, Flutter, and native Android (Gradle) projects.
When to Use
- The project has an Android app tracked in a GitHub repository
- No CI/CD pipeline exists yet for the Android build
- Goal: automate publishing to Google Play on every push to
mainand on version tags - User wants to avoid manual
versionCodebumping
Quick Start
Run the interactive setup wizard from the root of the target project:
npx android-cicd
The wizard handles: framework detection → keystore generation → GitHub Secrets → workflow scaffold.
Prerequisites
Before running the wizard, ensure:
- Node.js ≥ 18
- JDK 17 installed with
keytoolaccessible (JAVA_HOMEset, or installed via Eclipse Adoptium / Android Studio) ghCLI installed and authenticated (gh auth login)- App already created in Google Play Console — at least one manual AAB/APK upload done (required before the API can publish)
- App enrolled in Play App Signing (Google manages the signing key; you manage the upload key)
- Google Play Android Developer API enabled in Google Cloud Console
- Service account JSON key downloaded (see Manual Steps below)
Framework Detection
The wizard auto-detects the framework from the project directory structure:
| Condition | Detected framework |
|---|---|
pubspec.yaml contains flutter: |
flutter |
android/app/build.gradle exists + package.json has react-native dep |
react-native |
android-root-app/build.gradle or twa-manifest.json or .bubblewrap/config.json exists |
twa |
app/build.gradle exists |
native |
android/app/build.gradle exists (fallback) |
native |
The user can override the detected framework during the wizard.
Multi-Stage Pipeline
The scaffolded workflow publishes to different tracks based on the git ref:
| Git event | Google Play track |
|---|---|
Push to main |
internal |
Tag matching v*-alpha (e.g. v1.2-alpha) |
alpha |
Tag matching v*-beta (e.g. v1.2-beta) |
beta |
Tag matching v* (e.g. v1.2.0) |
production |
Manual workflow_dispatch |
User-selectable (internal / alpha / beta / production) |
To release to production:
git tag v1.2.0
git push origin v1.2.0
Auto-Bump versionCode
On every push to main, CI automatically:
- Reads the current
versionCodefrom the version file for the detected framework - Increments it by 1
- Commits the change with
[skip ci](prevents re-triggering the workflow) - Pushes the commit back to
main
Version file by framework:
| Framework | Version file | Field |
|---|---|---|
| TWA | android-root-app/build.gradle |
versionCode |
| React Native | android/app/build.gradle |
versionCode |
| Flutter | pubspec.yaml |
version: x.y.z+N (the +N build number) |
| Native | app/build.gradle |
versionCode |
For tag-based builds (alpha / beta / production), auto-bump does not run — the tag represents a pinned commit. Increment the version manually before tagging.
Required GitHub Secrets
The wizard sets these automatically via gh secret set:
| Secret | Description |
|---|---|
KEYSTORE_FILE |
Base64-encoded upload keystore (.jks) |
KEYSTORE_PASSWORD |
Keystore password |
KEY_ALIAS |
Key alias (e.g. upload) |
KEY_PASSWORD |
Key password (usually same as KEYSTORE_PASSWORD) |
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON |
Full JSON content of the service account key |
Signing Configuration
TWA / Native Android
Add to your build.gradle (see templates/gradle/signing.gradle):
android {
signingConfigs {
release {
storeFile file("keystore.jks")
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
}
buildTypes {
release {
minifyEnabled true
signingConfig signingConfigs.release
}
}
}
Never set
org.gradle.java.homeingradle.properties— it breaks Linux CI runners.
Flutter
The CI workflow creates android/key.properties at build time (from secrets) and cleans it up after. Your `android/ap
よくある質問
これを使う前に、アプリを手動で公開する必要がありますか?
はい。APIで公開できるようになる前に、Play Consoleへの手動アップロードを少なくとも一回行う必要があるとスキルは注意しています。
どのアプリの種類に対応していますか?
Trusted Web Activity、React Native、Flutter、ネイティブAndroidのプロジェクトが挙げられています。
事前に何をインストールしておく必要がありますか?
Node.js 18以上、JDK 17、ご自身のアカウントでログイン済みのGitHub CLIです。
詳細
作者による元の説明
Automated Android CI/CD pipeline to Google Play — supports TWA, React Native, Flutter, and native Android. Run npx android-cicd to set up keystore generation, GitHub Secrets, and a multi-stage workflow (internal/alpha/beta/production) with auto-bump versionCode.
人気
- GitHubのスター
- 33k
- ランキング
- #8724
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
owasp-security
33kエージェントがWebアプリ、API、モバイル、コンテナ、AIエージェント向けの OWASP のセキュリティ指針を理解し、よくある弱点を見つけて修正案を出せるよう支援します。
agent-management
33kエージェントが、AI Maestro のコマンドラインを使って AI エージェントを作成、一覧表示、休止、再開、名前変更、削除できるよう支援します。各エージェントのライフサイクルを管理します。
agent-messaging
33kエージェントが、主に自分のマシン上で Agent Messaging Protocol を使い、AIエージェント同士の署名付きメッセージを送信、受信、返信できるよう支援します。
docs-search
33kエージェントが、自動生成されたコードのドキュメントから関数の署名、クラスの定義、コメントを検索できるよう支援します。コードを変更する前に、実際のAPIを確認できます。
似ているスキル
android-clean-architecture
280kエージェントがAndroidプロジェクトを効率よく整理できるようにします。コードを構造化して、保守や新機能の開発をしやすくします。
compose-multiplatform-patterns
280kエージェントがKMPプロジェクトでCompose MultiplatformとJetpack Composeのパターンを使えるようにします。状態管理、ナビゲーション、テーマ設定、パフォーマンスを扱います。
dart-flutter-patterns
280kエージェントがDartとFlutterのアプリ向けのコードを書けるようにします。最新のパターンを使い、堅牢で管理しやすいアプリを作ります。