Merge pull request #138 from bvlion/dependabot/gradle/com.android.too… #31
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 Main Branch CI | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'androidApp/**.kt' | |
- 'androidApp/**.xml' | |
- 'androidApp/proguard-rules.pro' | |
- '**.gradle.kts' | |
- '.github/workflows/main.yaml' | |
env: | |
ANDROID_ADMOB_KEY: ${{ secrets.ANDROID_ADMOB_KEY }} | |
ANDROID_ADMOB_NATIVE_KEY: ${{ secrets.ANDROID_ADMOB_NATIVE_KEY }} | |
GOOGLE_SERVICES_JSON: ${{ secrets.ANDROID_GOOGLE_SERVICES_JSON_64 }} | |
KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
HOST: ${{ secrets.HOST }} | |
BEARER: ${{ secrets.BEARER }} | |
jobs: | |
apk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set config files | |
run: echo $GOOGLE_SERVICES_JSON | base64 -d > androidApp/src/release/google-services.json | |
- name: Run Build | |
run: ./gradlew assembleRelease | |
- name: Create note | |
run: git log -1 > note.txt | |
- name: Upload Firebase App Distribution | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
run: ./gradlew appDistributionUploadRelease |