Skip to content

Instantly share code, notes, and snippets.

@SamoraMachel
Last active August 4, 2022 11:52
Show Gist options
  • Save SamoraMachel/7111e9c7b132ee7276b4f51619f88547 to your computer and use it in GitHub Desktop.
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
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