Skip to content

Android Build And Deploy #29

Android Build And Deploy

Android Build And Deploy #29

name: Android Build And Deploy
on:
workflow_dispatch:
inputs:
deploy_version:
type: choice
description: Type of new deployed version
options:
- patch
- minor
- major
deploy_track:
type: choice
description: Choose whether you want to deploy to internal tests or to production
options:
- internal
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
bundler-cache: true
- name: Decode Service Account Key JSON File
run: echo $GPLAY_SERVICE_ACCOUNT_KEY | base64 -di > android/app/holidaily-fastlane.json
env:
GPLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GPLAY_SERVICE_ACCOUNT_KEY }}
- name: Decode Keystore
run: gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch android/app/HolidailyProd.keystore.gpg > android/app/HolidailyProd.keystore
- name: validate JSON key
run: bundle exec fastlane run validate_play_store_json_key json_key:android/app/holidaily-fastlane.json
- name: Add keys to gradle.properties
run: printf "HOLIDAILY_UPLOAD_STORE_PASSWORD=${{ secrets.HOLIDAILY_UPLOAD_STORE_PASSWORD }}\nHOLIDAILY_UPLOAD_KEY_PASSWORD=${{ secrets.HOLIDAILY_UPLOAD_KEY_PASSWORD }}\nHOLIDAILY_UPLOAD_KEY_ALIAS=${{ secrets.HOLIDAILY_UPLOAD_KEY_ALIAS }}" >> android/gradle.properties
- name: Deploy android beta
run: bundle exec fastlane android beta
env:
ANDROID_PACKAGE_NAME: com.holidaily
DEPLOY_TRACK: ${{ github.event.inputs.deploy_track }}
DEPLOY_VERSION: ${{ github.event.inputs.deploy_version }}
- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
- name: Set github user
run: |
git config --global user.name 'jan-kozinski'
git config --global user.email '[email protected]'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: release/android-${{ steps.extract_version.outputs.version }}
token: ${{secrets.PAT}}
add-paths: |
./package.json
./android/app/build.gradle
title: RELEASE Android-${{ steps.extract_version.outputs.version }}