Skip to content

Merge pull request #92 from grodnoroads/1.2.8 #50

Merge pull request #92 from grodnoroads/1.2.8

Merge pull request #92 from grodnoroads/1.2.8 #50

Workflow file for this run

name: Deploy App Bundle
on:
push:
branches: [ release ]
paths-ignore:
- '**/README.md'
- '.github/**'
workflow_dispatch:
permissions: write-all
jobs:
build_aab:
runs-on: ubuntu-latest
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant rights
run: chmod +x build.gradle.kts
- name: Copy google-services.json
run: echo ${{ secrets.GOOGLE_JSON }} | base64 --decode > app/android/google-services.json
- name: Copy key
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}/app/android/keystore.jks
encodedString: ${{ secrets.KEY_STORE }}
- name: Console
run: echo ${{ github.workspace }}/app/android/keystore.jks
- name: Make secrets.properties
run: echo ${{ secrets.SECRETS_PROPERTIES }} | base64 --decode > secrets.properties
- name: "Check keystore existence"
uses: andstor/file-existence-action@v1
with:
files: "app/android/keystore.jks"
- name: Make sh executable
run: chmod +x ./increment.sh
- name: Increment build number
run: ./increment.sh
shell: bash
- name: Build Release AAB
id: buildRelease
run: ./gradlew clean app:android:bundleRelease
- name: Upload *.aab artifact
id: uploadArtifact
uses: actions/upload-artifact@v1
with:
name: android
path: app/android/build/outputs/bundle/release/android-release.aab
- name: Create service_account.json
id: createServiceAccount
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- name: Deploy to Play Store (BETA)
id: deploy
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: com.egoriku.grodnoroads
releaseFiles: app/android/build/outputs/bundle/release/android-release.aab
track: beta
mappingFile: app/android/build/outputs/mapping/release/mapping.txt
status: completed
- name: Commit files
run: |
git config --local user.email "egorikftp@users.noreply.github.com"
git config --local user.name "egorikftp"
git commit -m "Increment build version" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.ref }}