Skip to content

Merge pull request #57 from egorikftp/v1.2.4 #42

Merge pull request #57 from egorikftp/v1.2.4

Merge pull request #57 from egorikftp/v1.2.4 #42

Workflow file for this run

name: Deploy App Bundle
on:
push:
branches: [ release ]
paths-ignore:
- '**/README.md'
- '.github/**'
workflow_dispatch:
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/google-services.json
- name: Copy key
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}/app/keystore.jks
encodedString: ${{ secrets.KEY_STORE }}
- name: Console
run: echo ${{ github.workspace }}/app/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/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 bundleRelease
- name: Upload *.aab artifact
id: uploadArtifact
uses: actions/upload-artifact@v1
with:
name: app
path: app/build/outputs/bundle/release/app-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/build/outputs/bundle/release/app-release.aab
track: beta
mappingFile: app/build/outputs/mapping/release/mapping.txt
status: completed
- name: Commit files
run: |
git config --local user.email "egorikftp@gmail.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 }}