$30 off During Our Annual Pro Sale. View Details »

Firebase App Distributionのテストアプリ配信を試しやすくする

Firebase App Distributionのテストアプリ配信を試しやすくする

2023/7/8に開催されたDroidKaigi.collect { #5@Nagoya }で登壇したLTの資料です

Yoshihiro WADA

July 08, 2023
Tweet

More Decks by Yoshihiro WADA

Other Decks in Technology

Transcript

  1. Firebase App Distribution
    Yoshihiro Wada / @e10dokup
    2023/07/08 @ DroidKaigi.collect { #5@Nagoya }

    View Slide

  2. {


    “id”: “@e10dokup”,


    “name”: “Yoshihiro Wada”,


    “affiliations”: [


    “CyberAgent Inc, / Ameba”


    ],


    “interested”: [


    “camera”, “gadget”, “driving”, “motorsports”


    ]


    }

    View Slide

  3. DeployGate
    Firebase App Distribution
    Firebase App Distribution
    tips
    GitHub Actions
    runs-on ubuntu-latest
    3

    View Slide

  4. GitHub Actions
    +
    Firebase App Distribution

    View Slide

  5. wzieba/Firebase-Distribution-GitHub-Action(*1)
    App Tester
    5
    *1:https://github.com/wzieba/Firebase-Distribution-Github-Action

    - name: upload artifact to Firebase App Distribution


    uses: wzieba/Firebase-Distribution-Github-Action@v1


    with:


    appId: ${{secrets.FIREBASE_APP_ID}}


    serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}


    groups: testers


    file: app/build/outputs/apk/release/app-release-unsigned.apk


    releaseNotes: ϝονϟΠέςϧϦϦʔεϊʔτ

    View Slide

  6. DeployGate #
    App Tester
    6

    View Slide

  7. View Slide

  8. Docker
    fi
    le
    fi
    rebase-tools
    Firebase CLI
    wzieba/Firebase-Distribution-GitHub-Action
    8

    i uploading binary...


    ✔ uploaded new release () successfully!


    ✔ View this release in the Firebase console: <ίϯιʔϧURL>


    ✔ Share this release with testers who have access: <ςελʔ༻URL>


    ✔ Download the release binary (link expires in 1 hour): <όΠφϦμ΢ϯϩʔυURL>

    i updating release notes...


    ✔ added release notes successfully

    i distributing to testers/groups...


    ✔ distributed to testers/groups successfully

    View Slide

  9. URL
    Firebase App Distribution
    URL
    Firebase App Distribution URL
    Firebase App Tester Deep Link
    URL
    APK/AAB URL
    1
    URL 3
    9

    View Slide

  10. URL
    Firebase App Distribution
    URL
    Firebase App Distribution URL
    Firebase App Tester Deep Link
    URL
    APK/AAB URL
    1
    URL 3
    10

    View Slide

  11. wzieba/Firebase-Distribution-GitHub-Action
    URL
    Fork
    Action
    URL
    Action
    URL
    URL
    11

    View Slide

  12. actions.yml
    outputs key-value
    tester_url
    Action
    12
    outputs:


    tester_url:


    description: ‘Url for Firebase App Tester’

    View Slide

  13. entrypoints.sh
    outputs grep 2 URL URL
    $GITHUB_OUTPUT key-value
    URL
    13
    output=$(firebase \


    /** தུ **/


    $( (( $INPUT_DEBUG )) && printf %s '--debug' )) # firebaseίϚϯυͷ݁ՌΛม਺ʹऔΔ


    status=$?


    echo $output


    if [ -n "${INPUT_TOKEN}" ] ; then


    echo ${TOKEN_DEPRECATED_WARNING_MESSAGE}


    fi


    tester_url=$(echo $output | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sed -n 2p )


    echo "tester_url=$tester_url" >> $GITHUB_OUTPUT # ͜ͷܗࣜͰecho͢ΔͱActionͷग़ྗͱͯ͠ೝࣝ͞ΕΔ


    exit $status

    View Slide

  14. GitHub Repository marketplace

    •/@


    ref
    outputs Action ID
    •steps..outputs.<ม਺໊>
    Action
    14

    View Slide

  15. PR
    api.qrserver.com QR
    URL
    15

    - name: upload artifact to Firebase App Distribution


    id: upload_fad # ͜͜ͷ஋Λ࢖ͬͯࢀর͢Δ


    uses: /Firebase-Distribution-Github-Action@master


    with:


    appId: ${{secrets.FIREBASE_APP_ID}}


    serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}


    groups: testers


    file: app/build/outputs/apk/release/app-release.apk


    releaseNotes: ϝονϟΠέςϧϦϦʔεϊʔτ


    - name: Comment to PullRequest


    if: success()


    uses: peter-evans/create-or-update-comment@v2


    with:


    issue-number: ${{ github.event.pull_request.number }}


    body: |


    Upload application is succeeded.


    check ${{ steps.upload_fad.outputs.tester_url }}.

    View Slide

  16. fi
    rebase-tools
    fi
    rebase-
    tools
    Fastlane
    Firebase API Fastlane
    URL
    Firebase API
    16

    View Slide