-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (59 loc) · 2.42 KB
/
android-build-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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/extract-package-version@v1.0.6
- name: Set github user
run: |
git config --global user.name 'jan-kozinski'
git config --global user.email 'jan-kozinski@users.noreply.github.com'
- 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 }}