Skip to content

Merge pull request #216 from mok-it/feature/project-time #25

Merge pull request #216 from mok-it/feature/project-time

Merge pull request #216 from mok-it/feature/project-time #25

Workflow file for this run

name: Android build & deploy to Play Console CI
env:
main_project_module: app
playstore_name: Mök App
keystore_path: ${{ github.workspace }}/mokapp_keystore.jks
key_props_path: ${{ github.workspace }}/key.properties
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Set Current Date As Env Variable
- name: Set current date as env variable
run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
# Set Repository Name As Env Variable
- name: Set repository name as env variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Change wrapper permissions
run: chmod +x ./gradlew
# # Run Tests Build
# - name: Run gradle tests
# run: ./gradlew test
# Create Bundle AAB Release
# Noted for main module build [main_project_module]:bundleRelease
- name: Build app bundle release (AAB) - ${{ env.main_project_module }} module
run: ./gradlew ${{ env.main_project_module }}:bundleRelease
- name: Sign Release
uses: r0adkll/sign-android-release@v1.0.4
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload to Google Play
uses: r0adkll/upload-google-play@v1.1.3
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: mok.it.app.mokapp
releaseFiles: app/build/outputs/bundle/release/app-release.aab
# whatsNewDirectory: distribution/whatsnew
# mappingFile: app/build/outputs/mapping/release/mapping.txt
# debugSymbols: app/intermediates/merged_native_libs/release/out/lib