Firebase App Distribution - tsutsumikeiichi/test-i-wiki GitHub Wiki

็พๅœจใฏ fastlane ็ตŒ็”ฑใง Firebase App Distribution ใ‚’ๅˆฉ็”จใ—ใฆใ„ใ‚‹ใ€‚

้…ๅธƒ็”จใƒญใƒผใƒซใ‚’ไป˜ไธŽใ—ใŸใ‚ตใƒผใƒ“ใ‚นใ‚ขใ‚ซใ‚ฆใƒณใƒˆใ‚’ไฝœๆˆใ—้ต็™บ่กŒใ‚’่กŒใฃใŸใ€‚ใใฎ้ตใ‚’ไฝฟใฃใฆ่ช่จผใ‚’่กŒใฃใฆใ„ใ‚‹ใ€‚
https://firebase.google.com/docs/app-distribution/ios/distribute-fastlane#service-acc-fastlane
https://console.cloud.google.com/iam-admin/serviceaccounts?authuser=0&project=otonari-dev-3b0ef

้…ๅธƒใซๆœ€ไฝŽ้™ๅฟ…่ฆใชใƒญใƒผใƒซ

  • firebaseappdistro.releases.list
  • firebaseappdistro.releases.update

ใฎใฟๆŒใคใ‚ซใ‚นใ‚ฟใƒ ใƒญใƒผใƒซใ‚’ไฝœใฃใฆใใ‚Œใ‚’ไป˜ไธŽใ—ใŸใŒใ€[email protected]ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใงใชใ„ใจไฝœๆˆใ€่จญๅฎšใŒใงใใชใ‹ใฃใŸใฎใงๆณจๆ„ใ€‚


Firebase CLI ใ‚คใƒณใ‚นใƒˆใƒผใƒซ

Firebase App Distribution  |  Firebase
https://firebase.google.com/docs/app-distribution?hl=ja

Firebase CLI ใƒชใƒ•ใ‚กใƒฌใƒณใ‚น  |  Firebase
https://firebase.google.com/docs/cli?hl=ja

Firebase CLI ใ‚’ไฝฟ็”จใ—ใฆใƒ†ใ‚นใ‚ฟใƒผใซ iOS ใ‚ขใƒ—ใƒชใ‚’้…ๅธƒใ™ใ‚‹  |  Firebase
https://firebase.google.com/docs/app-distribution/ios/distribute-cli?hl=ja

fastlane ใ‚’ไฝฟ็”จใ—ใฆ iOS ใ‚ขใƒ—ใƒชใ‚’ใƒ†ใ‚นใ‚ฟใƒผใซ้…ๅธƒใ™ใ‚‹  |  Firebase
https://firebase.google.com/docs/app-distribution/ios/distribute-fastlane?hl=ja

CI ใ‚ทใ‚นใƒ†ใƒ ใง CLI ใ‚’ไฝฟ็”จใ™ใ‚‹  |  Firebase
https://firebase.google.com/docs/cli?hl=ja#cli-ci-systems

App Distribution ใƒ†ใ‚นใ‚ฟใƒผใ‚’็ฎก็†ใ™ใ‚‹  |  Firebase
https://firebase.google.com/docs/app-distribution/manage-testers?hl=ja

  1. Firebase CLI ใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ™ใ‚‹
$ firebase -V
7.13.0

$ firebase login

$ firebase projects:list
โœ” Preparing the list of your Firebase projects
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Project Display Name โ”‚ Project ID                 โ”‚ Resource Location ID โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ otonari              โ”‚ otonari-production         โ”‚ us-central           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ otonari-dev          โ”‚ otonari-dev-3b0ef          โ”‚ us-central           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Fastfile ใฎใƒฌใƒผใƒณใซ firebase_app_distribution ใƒ–ใƒญใƒƒใ‚ฏใ‚’่ฟฝๅŠ 
  platform :ios do
      desc "My awesome app"
      lane :distribute do
          build_ios_app(...) # build_ios_app is a built-in fastlane action.

          firebase_app_distribution(
              app: "1:123456789:ios:abcd1234",
              testers: "[email protected], [email protected]",
              release_notes: "Lots of amazing new features to test out!",
              firebase_cli_path: "/absolute/path/to/firebase/cli/binary"
          )

      end
  end

Firebase CLI ใ‚ขใƒƒใƒ—ใƒ‡ใƒผใƒˆ

$ bundle exec fastlane update_plugins

CircleCI ใง Firebase CLI ใ‚’ไฝฟใ†

https://circleci.com/docs/2.0/deploying-ios/#deploying-to-firebase

็’ฐๅขƒๅค‰ๆ•ฐ FIREBASE_TOKEN ใ‚’่จญๅฎšใ™ใ‚‹ใ€‚


App Distribution could not generate credentials from the refresh token specified.ใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ—ใŸๅ ดๅˆ

ใƒˆใƒผใ‚ฏใƒณใฎๆ›ดๆ–ฐใ‚’่กŒใ†

$ bundle exec fastlane run firebase_app_distribution_login

[โœ”] ๐Ÿš€
+-------------------------------------------+---------+-----------------------------------------------------------+
|                                                  Used plugins                                                   |
+-------------------------------------------+---------+-----------------------------------------------------------+
| Plugin                                    | Version | Action                                                    |
+-------------------------------------------+---------+-----------------------------------------------------------+
| fastlane-plugin-firebase_app_distribution | 0.2.5   | firebase_app_distribution_login firebase_app_distribution |
+-------------------------------------------+---------+-----------------------------------------------------------+

[10:35:48]: ---------------------------------------------
[10:35:48]: --- Step: firebase_app_distribution_login ---
[10:35:48]: ---------------------------------------------
[10:35:48]: Open the following address in your browser and sign in with your Google account:
[10:35:48]: *******************
[10:35:48]: Enter the resulting code here: *******************
[10:37:12]:
[10:37:12]: Set the refresh token as the FIREBASE_TOKEN environment variable
[10:37:12]: Refresh Token: *******************
[10:37:12]: Result: true