├── .github └── workflows │ └── main.yml ├── Dockerfile ├── LICENSE ├── README.md ├── action.yml ├── app-release-ac-signed.apk └── distributeApp.sh /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: [ main ] 5 | pull_request: 6 | branches: [ main ] 7 | 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@main 16 | - name: Firebase App Distribution Action 17 | uses: ./ 18 | with: 19 | app_id: ${{secrets.FIREBASE_APP_ID}} 20 | firebase_token: ${{secrets.FIREBASE_TOKEN}} 21 | app_file: app-release-ac-signed.apk 22 | tester_groups: maintainers 23 | 24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine 2 | 3 | WORKDIR /app 4 | COPY . /app 5 | 6 | RUN apk update && apk add git 7 | RUN npm install -g firebase-tools 8 | 9 | RUN chmod +x /app/distributeApp.sh 10 | ENTRYPOINT [ "/app/distributeApp.sh" ] 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 hasretsariyer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Firebase App Distribution Github Action 2 | 3 | Github Action to upload your app binaries(.ipa or .apk) to Firebase and sends email to your testers. 4 | 5 | ## Required Inputs 6 | 7 | ### `app_id` 8 | 9 | Firebase App ID. You can find it in the Firebase console, on the [General Settings page](https://console.firebase.google.com/u/0/project/_/settings/general). 10 | 11 | ### `app_file` 12 | 13 | Path of IPA or APK file to distribution. 14 | 15 | ### `firebase_token` 16 | 17 | Firebase access token. You can generate it by `firebase login:ci` on your local machine. 18 | Visit [Firebase cli-ci-systems page](https://firebase.google.com/docs/cli#cli-ci-systems) for more detail. 19 | 20 | ## Optional Inputs 21 | 22 | ### `tester_groups` 23 | 24 | Distribution groups. You can specify the groups as a comma-separated list: `android-team, ios-team, qa-team` 25 | 26 | ### `release_notes` 27 | 28 | Release notes for this build. If not specified, the action will add commit short hash and commit message. 29 | Sample: `a6e6c41 Edit yaml file` 30 | 31 | ## Sample Usage 32 | 33 | - name: CI 34 | on: 35 | push: 36 | branches: [ main ] 37 | pull_request: 38 | branches: [ main ] 39 | 40 | workflow_dispatch: 41 | 42 | jobs: 43 | build: 44 | runs-on: ubuntu-latest 45 | steps: 46 | - name: Firebase App Distribution 47 | uses: hasretsariyer/firebase-app-distribution-github-action@v1 48 | with: 49 | app_id: ${{secrets.FIREBASE_APP_ID}} 50 | firebase_token: ${{secrets.FIREBASE_TOKEN}} 51 | app_file: app-release.apk 52 | tester_groups: maintainers 53 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Firebase App Distribution Action' 2 | description: 'Distributes IPA or APK to testers.' 3 | author: 'hasretsariyer@gmail.com' 4 | inputs: 5 | app_id: 6 | description: 'Firebase App ID. You can find it in the Firebase console, on the General Settings page.' 7 | required: true 8 | app_file: 9 | description: 'Path of IPA or APK file to distribution.' 10 | required: true 11 | firebase_token: 12 | description: | 13 | 'Firebase access token. You can create it by `firebase login:ci` on your local machine. 14 | Visit [cli-ci-systems](https://firebase.google.com/docs/cli#cli-ci-systems) for more detail' 15 | required: true 16 | tester_groups: 17 | description: 'Distribution groups' 18 | required: false 19 | release_notes: 20 | description: 'Release notes for this build.' 21 | required: false 22 | branding: 23 | icon: "send" 24 | color: "yellow" 25 | runs: 26 | using: 'docker' 27 | image: 'Dockerfile' 28 | -------------------------------------------------------------------------------- /app-release-ac-signed.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasretsariyer/firebase-app-distribution-github-action/1efdc61b2aecd54be4072edb5dd527be26571943/app-release-ac-signed.apk -------------------------------------------------------------------------------- /distributeApp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [[ -z ${INPUT_RELEASE_NOTES} ]]; then 5 | INPUT_RELEASE_NOTES="$(git log -1 --abbrev-commit --pretty=oneline)" 6 | fi 7 | 8 | firebase appdistribution:distribute "$INPUT_APP_FILE" --app \ 9 | "$INPUT_APP_ID" --token "$INPUT_FIREBASE_TOKEN" --groups "$INPUT_TESTER_GROUPS" \ 10 | --release-notes "$INPUT_RELEASE_NOTES" 11 | --------------------------------------------------------------------------------