Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
name: Android Pull Request & Master CI & CD to Firebase
on:
pull_request:
branches:
- 'master'
push:
branches:
- 'master'
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Unit tests
run: bash ./gradlew test --stacktrace
build:
name: Upload apk to App Tester
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: build release
run: bash ./gradlew assembleDebug
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1.2.2
with:
appId: '1:994326970928:android:2ki953237460aib8a4341c'
token: '1//03OuOvyPJmIZ2CgYIARAAGAMSNwF-L9IresD0hjK9dg8BFAJwzVVna9uj76A4rWJW5jK9dg878eP4rWJW5jKjOg6VH7YcGBFAJwz'
groups: testers
file: app/build/outputs/apk/debug/app-debug.apk
apk:
name: Generate APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build debug APK
run: bash ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: app
path: app/build/outputs/apk/debug/app-debug.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment