Skip to content

Merge pull request #440 from GSM-MSG/update-pull-request-template #5

Merge pull request #440 from GSM-MSG/update-pull-request-template

Merge pull request #440 from GSM-MSG/update-pull-request-template #5

Workflow file for this run

name: Android CD
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- 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: Create LOCAL_PROPERTIES
run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties
- name: Access GOOGLE_SERVICES
run: echo '${{ secrets.GOOGLE_SERVICES }}' > ./app/google-services.json
- name: Access SERVICE_ACCOUNT_JSON
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- name: Build Release AAB
id: buildRelease
run: ./gradlew bundleRelease
- name: Sign AAB
id: sign
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload AAB
id: uploadArtifact
uses: actions/upload-artifact@v1
with:
name: app
path: app/build/outputs/bundle/release/app-release.aab
- name: Deploy to Play Store
id: deploy
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: com.msg.gcms
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: beta