• HOME
  • DC News
  • World
  • Politics
  • SPORTS
  • Business
  • Education
  • Entertainment
  • Health
  • Crime Beat
  • National
  • Tech
  • Weather
  • CLASSIFIEDS & ADS
    • Free Classified Ads
    • Our Contractors
    • Our Local Businesses
Saturday, December 5, 2026
DC City Beat
No Result
View All Result
Subscribe Now
  • HOME
  • DC News
  • World
  • Politics
  • SPORTS
  • Business
  • Education
  • Entertainment
  • Health
  • Crime Beat
  • National
  • Tech
  • Weather
  • CLASSIFIEDS & ADS
    • Free Classified Ads
    • Our Contractors
    • Our Local Businesses
DC City Beat
  • HOME
  • DC News
  • World
  • Politics
  • SPORTS
  • Business
  • Education
  • Entertainment
  • Health
  • Crime Beat
  • National
  • Tech
  • Weather
  • CLASSIFIEDS & ADS
    • Free Classified Ads
    • Our Contractors
    • Our Local Businesses
No Result
View All Result
DC City Beat
No Result
View All Result
Home Tech

Effortlessly Deploy Your App to Google Play Using Codemagic CLI and GitHub Actions

by Chief Editor Rob Nightingale
December 2, 2026
in Tech
0
Effortlessly Deploy Your App to Google Play Using Codemagic CLI and GitHub Actions

本記事は、佐藤将来が執筆しました。

Codemagic CLIツールの進化に伴い、AndroidアプリのGoogle Play Consoleへのデプロイ機能が強化されました。これに関しては、以前の記事でCodemagic CLIツールとGitHub Actionsを利用したApp Store Connectへのアプリデプロイ方法について解説しました。

Codemagic CLIツールの概要

Codemagic CLIツールは、CodemagicのCI/CDプラットフォームを駆動するための無料のオープンソースツールです。このツールを利用することで、アプリのビルド、コード署名、ストアへのデプロイメントを効率化できます。

クロスプラットフォームに対応しており、iOSとAndroidのプロジェクトで同じツールセットを使用可能です。また、CodemagicのクラウドベースのCI/CDサービスとは異なり、CLIツールではローカル環境でのビルドやGitHub Actionsなどの任意のCI/CDプラットフォームとの統合が可能です。ユーザーフレンドリーな設計により、初心者から上級者まで幅広い層に適しています。

この記事では、このCLIツールとGitHub Actionsを使用してFlutterアプリをGoogle Play Consoleにデプロイする方法を紹介します。実践することで、アプリの配布プロセスを効率化し、多くの時間とリソースを節約できます。

必要条件

以下の条件が満たされていることを確認してください。

Google Playデベロッパーアカウントの取得

Google Playストアにアプリをリリースするには、有料のアカウント登録が必要です。

Google Play Consoleへのアプリ登録

Google Play Consoleに対象アプリが既に作成されている必要があります。

事前準備

GitHub Actionsのパイプライン作成に必要な準備を行います。

Keystoreの確認

Flutterプロジェクトを使用しているIDEで開き、/android/key.propertiesに記載されているGoogle Playへのアップロード鍵となるjksファイルおよび「storePassword」「keyPassword」「keyAlias」を確認します。

例:

            
                storePassword=XXXXXXXX
                keyPassword=XXXXXXXX
                keyAlias=upload
                storeFile=upload-keystore.jks
            
        

jksファイルが未作成の場合、以下のコマンドで作成してください:

            
                keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA 
                    -keysize 2048 -validity 10000 -alias upload
            
        

詳しい情報は公式ドキュメントを参照してください。

build.gradleの確認

appレベルのbuild.gradleまたはbuild.gradle.ktsを開いて、key.propertiesを参照できる状態になっているか確認してください:

            
                def keystoreProperties = new Properties()
                def keystorePropertiesFile = rootProject.file('key.properties')
                if (keystorePropertiesFile.exists()) {
                    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
                }
                android {
                    signingConfigs {
                        release {
                            keyAlias = keystoreProperties['keyAlias']
                            keyPassword = keystoreProperties['keyPassword']
                            storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
                            storePassword = keystoreProperties['storePassword']
                        }
                    }
                }
            
        

Google Play APIの接続設定

Codemagicを通じてGoogle Playにアプリを公開するためのAPI接続設定を行います。

  1. Google Cloud Consoleで対象アプリのプロジェクトを開きます。

  2. Google Play Android Developer APIを有効化します。

  3. Credentialsメニューからサービスアカウントを新規作成します。

  4. アカウント名と説明を入力します。

  5. 「Service Accounts」 > 「Service Account User」のロールを選択します。

  6. サービスアカウントの「Actions」から編集画面を開きます。

  7. 「Keys」タブから「Create new key」をクリックします。

  8. Key typeは「JSON」を選択し、新しいキーを作成します。

  9. 作成されたプライベートキーを安全な場所に保管します。

  10. Google Play Consoleに移動し、「ユーザーと権限」内の「新しいユーザーを招待」をクリックします。

  11. メールアドレスに、先ほど作成したサービスアカウントのものを入力し、アプリを追加して権限を付与します。

変数とシークレットの設定

Codemagic CLIツールをGitHub Actionsで利用するためには、リポジトリに変数とシークレットを設定する必要があります。変数はテキスト値としてワークフロー内で参照できますが、シークレットは暗号化されており機密情報を安全に管理できます。

変数の設定

以下の変数を設定します:

  • ANDROID_KEY_ALIAS:key.properties内のkeyAliasの値(例:upload)。
  • ANDROID_KEYSTORE_FILENAME:key.properties内のstoreFileの値(例:upload-keystore.jks)。
  • GOOGLE_PLAY_PACKAGE_NAME:Google Playに登録しているアプリのパッケージ名(例:com.example.app)。

シークレットの設定

以下のシークレットを設定します:

  • ANDROID_KEYSTORE:jksのアップロード鍵。android/app/upload-keystore.jksに保存されている場合、以下のコマンドでbase64エンコードされた値を取得します:
            
                openssl base64 < android/app/upload-keystore.jks | pbcopy
            
        

  • ANDROID_KEYSTORE_PASSWORD:key.properties内のstorePasswordの値。
  • ANDROID_KEY_PASSWORD:key.properties内のkeyPasswordの値。
  • GOOGLE_PLAY_SERVICE_ACCOUNT_CREDENTIALS:サービスアカウント用のJsonキー。先ほど保管したものを貼り付けます。

GitHub Actionsパイプラインの構築

このセクションでは、GitHub Actionsを使用してFlutterアプリをビルドし、Codemagic CLIツールを利用してGoogle Playにアップロードする方法を説明します。

YAMLファイルはプロジェクトの.github/workflows/ディレクトリに保存し、拡張子は.yamlとなります。

GitHub ActionsにはPythonが事前にインストールされていますが、Codemagic CLIツールにはPython 3.8以上が必要です。setup-pythonを利用してバージョンを指定できます。

まずはGitHub Actionsに慣れるため、シンプルなHello world!を出力する例から始めましょう:

            
                name: Hello World Workflow
                on: [push]
                jobs:
                  build:
                    runs-on: ubuntu-latest
                    steps:
                      - name: Echo Hello World
                        run: echo "Hello, World!"
            
        

このワークフローは、リポジトリへのpushをトリガーとして実行され、最新のUbuntu環境(ubuntu-latest)上で動作します。

次に、テスト目的でワークフローを手動トリガー(workflow_dispatch)に設定し、事前に設定したリポジトリ変数やシークレットを使用してGoogle Playとの連携を構成します。

  1. コードの取得:actions/checkout@v4アクションを使用。
  2. Flutterのセットアップ:subosito/flutter-actionを使用。
  3. Codemagic CLIツールのインストール。
  4. 環境変数の設定:事前に登録した変数を設定。
  5. Androidキーストアのセットアップ:アップロード鍵をデコードして指定の場所に格納。
  6. key.propertiesファイルの作成。
  7. Android App Bundleのビルド。
  8. Google Playへの公開。

おわりに

Codemagic CI/CDはモバイル開発やコード署名、シンプルなYAML設定に最適化された環境を提供します。CLIツールを活用することで、ローカル環境やCI/CDパイプラインでも柔軟で効率的なアプリのビルドと公開が可能です。

本記事では、Codemagic CLIツールを使用してGitHub ActionsパイプラインからAndroidビルドをGoogle Playへ公開する手順を紹介しました。ぜひ実践してみてください!

また、Google Playへのデプロイに加えて、App Store Connectへの処理も設定することで、開発フローをさらにスムーズにできます。

さらに詳しく知りたい方へ

Chief Editor Rob Nightingale
OFFICIAL EDITORIAL SEAL • DC CITY BEAT
Chief Editor Rob Nightingale

Chief Editor of DC City Beat — Washington, D.C.'s independent investigative newspaper covering the nation's capital with fearless public accountability and free access for all readers.

ShareTweetSend
Previous Post

Choosing the Right Dashboard: A Guide to Optimal Decision-Making Tools

Next Post

LSU President Warns of Legal Action Amid SEC Expulsion Threat

Related News

Introducing Codemagic: A Fresh Start as We Bid Farewell to App Center!
Tech

Introducing Codemagic: A Fresh Start as We Bid Farewell to App Center!

December 5, 2026
Microplastics Found in Isolated Himalayan Lake: A Wake-Up Call for Environmental Awareness
Tech

Microplastics Found in Isolated Himalayan Lake: A Wake-Up Call for Environmental Awareness

December 5, 2026
Nvidia’s Latest SEC Filing Reveals Internal Accountability Amid Ongoing Huang Investigation
Tech

Nvidia’s Latest SEC Filing Reveals Internal Accountability Amid Ongoing Huang Investigation

December 5, 2026
Pixel 11 Buyers Left Disappointed as Expectations Fall Short of Reality
Tech

Pixel 11 Buyers Left Disappointed as Expectations Fall Short of Reality

December 5, 2026
Next Post
LSU President Warns of Legal Action Amid SEC Expulsion Threat

LSU President Warns of Legal Action Amid SEC Expulsion Threat

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest
guest
0 Comments
Oldest
Newest Most Voted
Customer Support
DC City Beat
Washington, D.C. Investigative Newspaper
Washington D.C. Headquarters Robert Nightingale • 712 H St. NE Unit #574
Washington, DC 20002 USA
Call: (857) 247-7603
e-mail: rmnightingale13@gmail.com
DC City Beat - Washington, D.C. Investigative Newspaper - Chief Editor Rob Nightingale
WASHINGTON, D.C. INVESTIGATIVE NEWSPAPER

DC CITY BEAT

Covering Washington D.C., Maryland & Northern Virginia
CHIEF EDITOR ROB NIGHTINGALE

The Independent Voice of Washington D.C. — Bringing fearless public accountability, investigative reporting, and free photo classifieds across Washington D.C., Maryland, and Northern Virginia. Always 100% free with no paywalls.

📢 DC Metro Marketplace & Directory
Connect With Readers Across Washington D.C., MD & VA

Free Photo Classifieds & Annual Display Ads ($500 – $10,000/Yr). Grow your reach across the District of Columbia, Northern Virginia, and suburban Maryland through our independent digital newspaper and verified merchant directory.

+ Post Free Classified Ad 💼 Advertise Your Business

About DC City Beat

Washington, D.C.'s independent online investigative newspaper covering the District of Columbia, Capitol Hill, Northern Virginia, and Maryland suburbs — delivering public accountability, breaking investigative journalism, and free community classifieds.

D.C. HEADQUARTERS DC City Beat
Robert Nightingale
712 H St. NE Unit #574
Washington, DC 20002
(857) 247-7603
EDITORIAL DESK Press & Investigations
Chief Editor Rob Nightingale
USA Newsroom
(857) 247-7603
Email: rmnightingale13@gmail.com

Categories

  • Business
  • Crime Beat
  • DC News
  • Education
  • Entertainment
  • Health
  • National
  • Politics
  • Sports
  • Tech
  • Weather
  • World
No Result
View All Result

Recent News

Myrsini Aristidou Discusses Cyprus’s Oscar Nomination Journey in Exclusive Interview

Myrsini Aristidou Discusses Cyprus’s Oscar Nomination Journey in Exclusive Interview

December 5, 2026
76ers Struggle to Conceal Ongoing Challenges in High-Stakes Matches

76ers Struggle to Conceal Ongoing Challenges in High-Stakes Matches

December 5, 2026
Achieving a Historic Milestone: Shines Secures Maiden Formula 1 Pole Position in Abu Dhabi

Achieving a Historic Milestone: Shines Secures Maiden Formula 1 Pole Position in Abu Dhabi

December 5, 2026
Exclusive Preview: Discover JFK’s Revamped Lufthansa Group Lounge Experience

Exclusive Preview: Discover JFK’s Revamped Lufthansa Group Lounge Experience

December 5, 2026
  • Free Classified Ads
  • Home
  • Our Contractors
  • Our Local Businesses
  • Subscribe

DC City Beat © 2026 | All Rights Reserved. The Independent Voice of Washington D.C.

No Result
View All Result
  • HOME
  • DC News
  • World
  • Politics
  • SPORTS
  • Business
  • Education
  • Entertainment
  • Health
  • Crime Beat
  • National
  • Tech
  • Weather
  • CLASSIFIEDS & ADS
    • Free Classified Ads
    • Our Contractors
    • Our Local Businesses

DC City Beat © 2026 | All Rights Reserved. The Independent Voice of Washington D.C.

0
0
Would love your thoughts, please comment.x
()
x
| Reply