Skip to content

Merge pull request #100 from Nexters/dev #18

Merge pull request #100 from Nexters/dev

Merge pull request #100 from Nexters/dev #18

Workflow file for this run

name: Android CD
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
environment: Android CI/CD
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create local.properties
env:
BASE_URL: ${{ secrets.BASE_URL }}
run:
echo -e "BASE_URL=\"$BASE_URL\" \nSIGNING_KEY_ALIAS=${{ secrets.SIGNING_KEY_ALIAS }}\nSIGNING_KEY_PASSWORD=${{ secrets.SIGNING_KEY_PASSWORD }}\nSIGNING_STORE_PASSWORD=${{ secrets.SIGNING_STORE_PASSWORD }}" >> ./local.properties
shell: bash
- name: Create Google Services JSON File
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Generate Keystore file from Github Secrets
run: |
mkdir ./app/keystore
echo "$KEYSTORE" > ./app/keystore/keystore.b64
base64 -d -i ./app/keystore/keystore.b64 > ./app/keystore/wwwKs.jks
env:
KEYSTORE: ${{ secrets.APP_KEYSTORE_BASE64 }}
- name: build release aab
run: ./gradlew app:bundleRelease
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/bundle/release/app-release.aab