android-cd #21
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-cd | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: macos-latest | |
environment: Android CI/CD | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create Google Services JSON File | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: | | |
echo "$GOOGLE_SERVICES_JSON" > google-services.json.b64 | |
base64 -d -i google-services.json.b64 > ./app/google-services.json | |
- name: Create Firebase Service Credentials file | |
env: | |
FIREBASE_CREDENTIALS: ${{ secrets.FIREBASE_CREDENTIALS }} | |
run: | | |
echo "$FIREBASE_CREDENTIALS" > firebase_credentials.json.b64 | |
base64 -d -i firebase_credentials.json.b64 > firebase_credentials.json | |
- name: Create LocalProperites | |
env: | |
CREDENTIAL_WEB_CLIENT_ID: ${{ secrets.CREDENTIAL_WEB_CLIENT_ID }} | |
MISSION_MATE_BASE_URL: ${{ secrets.MISSION_MATE_BASE_URL }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
run: | | |
echo CREDENTIAL_WEB_CLIENT_ID=\"$CREDENTIAL_WEB_CLIENT_ID\" > ./local.properties | |
echo MISSION_MATE_BASE_URL=\"$MISSION_MATE_BASE_URL\" >> ./local.properties | |
echo SIGNING_STORE_PASSWORD=$SIGNING_STORE_PASSWORD >> ./local.properties | |
echo SIGNING_KEY_PASSWORD=$SIGNING_KEY_PASSWORD >> ./local.properties | |
echo SIGNING_KEY_ALIAS=$SIGNING_KEY_ALIAS >> ./local.properties | |
- name: Generate Keystore file from Github Secrets | |
env: | |
KEYSTORE: ${{ secrets.KEYSTORE_BASE64 }} | |
run: | | |
echo "$KEYSTORE" > ./mission-mate-keystore.b64 | |
base64 -d -i ./mission-mate-keystore.b64 > ./app/mission-mate-keystore.jks | |
- name: build release aab | |
run: ./gradlew app:bundleRelease | |
- name: Upload .aab as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-bundle | |
path: app/build/outputs/bundle/release/app-release.aab |