-
Notifications
You must be signed in to change notification settings - Fork 37
143 lines (125 loc) · 5.18 KB
/
distribute-android.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Overview
# This GitHub Action automates the build and distribution process for the Haqq Wallet Android application.
# It builds the project and distributes the APK to Google Play.
name: Distribute Android
on:
workflow_dispatch:
inputs:
IS_DEVELOPMENT:
type: choice
description: IS_DEVELOPMENT
options:
- false
- true
IS_SSS_ENABLED:
type: choice
description: IS_SSS_ENABLED
options:
- true
- false
IS_NFT_ENABLED:
type: choice
description: IS_NFT_ENABLED
options:
- true
- false
STORIES_ENABLED:
type: choice
description: STORIES_ENABLED
options:
- true
- false
BUILD_DESCRIPTION:
required: true
description: Please add a short note for a new build
workflow_call:
inputs:
IS_DEVELOPMENT:
required: true
type: string
IS_SSS_ENABLED:
required: true
type: string
IS_NFT_ENABLED:
required: true
type: string
STORIES_ENABLED:
required: true
type: string
BUILD_DESCRIPTION:
required: true
type: string
jobs:
build:
name: Distribute Android
runs-on: ubuntu-cpu16-ram64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup NodeJS@18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
bundler-cache: true
- name: Decode secrets
run: |
echo ${{secrets.HAQQ_KEYSTORE}} | base64 -d > android/app/haqq-upload-key.keystore
echo ${{secrets.GOOGLE_SERVICE_ACCOUNT}} | base64 -d > android/app/google-account.json
echo ${{secrets.GOOGLE_SERVICE_ANDROID}} | base64 -d > android/app/google-services.json
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "ENVIRONMENT=distribution" >> .env
echo "IS_DEVELOPMENT=${{github.event.inputs.IS_DEVELOPMENT}}" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
echo "HAQQ_BACKEND_DEV=${{secrets.HAQQ_BACKEND_DEV}}" >> .env
echo "ADJUST_TOKEN=${{secrets.ADJUST_TOKEN}}" >> .env
echo "ADJUST_ENVIRONMENT=${{secrets.ADJUST_ENVIRONMENT}}" >> .env
echo "IS_SSS_ENABLED=${{github.event.inputs.IS_SSS_ENABLED}}" >> .env
echo "IS_NFT_ENABLED=${{github.event.inputs.IS_NFT_ENABLED}}" >> .env
echo "GOOGLE_PLAY_PACKAGE=${{secrets.GOOGLE_PLAY_PACKAGE}}" >> .env
echo "APPSTORE_APP_ID=${{secrets.APPSTORE_APP_ID}}" >> .env
echo "TURNSTILE_URL=${{secrets.TURNSTILE_URL}}" >> .env
echo "TURNSTILE_SITEKEY=${{secrets.TURNSTILE_SITEKEY}}" >> .env
echo "RECAPTCHA_V2_URL=${{secrets.RECAPTCHA_V2_URL}}" >> .env
echo "RECAPTCHA_V2_SITEKEY=${{secrets.RECAPTCHA_V2_SITEKEY}}" >> .env
echo "HCAPTCHA_URL=${{secrets.HCAPTCHA_URL}}" >> .env
echo "STORIES_ENABLED=${{github.event.inputs.STORIES_ENABLED}}" >> .env
echo "DETOX_MILK_PRIVATE_KEY=${{secrets.DETOX_MILK_PRIVATE_KEY}}" >> .env
echo "DETOX_PROVIDER=${{secrets.DETOX_PROVIDER}}" >> .env
echo "DETOX_CHAIN_ID=${{secrets.DETOX_CHAIN_ID}}" >> .env
echo "MMKV_KEY=${{secrets.MMKV_KEY}}" >> .env
echo "POSTHOG_API_KEY=${{secrets.POSTHOG_API_KEY}}" >> .env
echo "POSTHOG_HOST=${{secrets.POSTHOG_HOST}}" >> .env
- name: Install packages
run: yarn install
- name: Install Zulu17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build and Send the app to Google Play
run: bundle exec fastlane android distribute
env:
HAQQ_UPLOAD_STORE_FILE: ${{ secrets.HAQQ_UPLOAD_STORE_FILE }}
HAQQ_UPLOAD_STORE_PASSWORD: ${{ secrets.HAQQ_UPLOAD_STORE_PASSWORD }}
HAQQ_UPLOAD_KEY_ALIAS: ${{ secrets.HAQQ_UPLOAD_KEY_ALIAS }}
HAQQ_UPLOAD_KEY_PASSWORD: ${{ secrets.HAQQ_UPLOAD_KEY_PASSWORD }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_TESTERS: ${{ secrets.FIREBASE_TESTERS }}
BUILD_DESCRIPTION: ${{inputs.BUILD_DESCRIPTION || github.event.inputs.BUILD_DESCRIPTION}}