Last active
November 24, 2021 17:36
-
-
Save wandersonalwes/2d0d1f15b5a500dc32155bce27af6511 to your computer and use it in GitHub Desktop.
Automatizar processo de build no React Native e envio para Firebase App Distribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Android | |
| on: | |
| push: | |
| branches: [dev] | |
| pull_request: | |
| branches: [dev] | |
| workflow_dispatch: | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: | | |
| yarn install | |
| - name: Build Android Release | |
| run: | | |
| cd android && ./gradlew assembleRelease | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v1 | |
| with: | |
| name: app-release.apk | |
| path: android/app/build/outputs/apk/release/ | |
| - name: Distribute app via Firebase App Distribution | |
| env: | |
| firebaseToken: ${{ secrets.FIREBASE_TOKEN }} | |
| firebaseGroups: ${{ secrets.FIREBASE_GROUPS }} | |
| firebaseAppId: ${{ secrets.FIREBASE_APP_ID }} | |
| notes: ${{ github.event.head_commit.message }} | |
| run: | | |
| yarn global add firebase-tools | |
| export PATH="$(yarn global bin):$PATH" | |
| firebase \ | |
| appdistribution:distribute android/app/build/outputs/apk/release/app-release.apk \ | |
| --app $firebaseAppId \ | |
| --release-notes "$notes" \ | |
| --groups "$firebaseGroups" \ | |
| --token "$firebaseToken" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment