Last active
August 4, 2022 11:52
-
-
Save SamoraMachel/7111e9c7b132ee7276b4f51619f88547 to your computer and use it in GitHub Desktop.
A github action for upload a build to firebase after the PR has been closed
This file contains 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: Android CI | |
on: | |
pull_request: | |
branches: [ "main" ] | |
types: | |
- closed | |
jobs: | |
build: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease | |
- name: Upload to firebase | |
uses: wzieba/Firebase-Distribution-Github-Action@v1.3.4 | |
with: | |
appId: ${{secrets.FIREBASE_ID}} | |
token: ${{secrets.FIREBASE_TOKEN}} | |
file: app/build/outputs/apk/release/app-release-unsigned.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment