-
Notifications
You must be signed in to change notification settings - Fork 20
161 lines (143 loc) · 6.12 KB
/
testapp-build.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: TestApp build
run-name: TestApp build (v${{ github.event.inputs.version }} №${{ github.event.inputs.build-number }}) of ${{ github.ref_name }}
on:
workflow_dispatch:
inputs:
version:
description: Version
default: "1.31"
required: true
build-number:
description: Build number
required: true
ios:
type: boolean
description: iOS
default: true
required: true
android:
type: boolean
description: Android
default: true
required: true
jobs:
testapp-build:
name: Create new iOS / Android builds and upload them via TestApp
runs-on: macos-14
environment: testapp
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Repository setup
uses: ./.github/workflows/repository-setup
- name: Secrets setup
uses: ./.github/workflows/secrets-setup
with:
READ_ONLY_SIGNER_PUBLIC_KEY: ${{ vars.READ_ONLY_SIGNER_PUBLIC_KEY }}
READ_ONLY_SIGNER_PUBLIC_KEY_HASH: ${{ vars.READ_ONLY_SIGNER_PUBLIC_KEY_HASH }}
JITSU_ANALYTICS_KEY: ${{ vars.JITSU_ANALYTICS_KEY }}
JITSU_TRACKING_HOST: ${{ vars.JITSU_TRACKING_HOST }}
TEMPLE_WALLET_ROUTE3_AUTH_TOKEN: ${{ vars.TEMPLE_WALLET_ROUTE3_AUTH_TOKEN }}
TEMPLE_WALLET_EXOLIX_API_KEY: ${{ secrets.TEMPLE_WALLET_EXOLIX_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_API_KEY: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_API_KEY }}
TEMPLE_WALLET_EVERSTAKE_LINK_ID: ${{ secrets.TEMPLE_WALLET_EVERSTAKE_LINK_ID }}
TEMPLE_WALLET_UTORG_SID: ${{ secrets.TEMPLE_WALLET_UTORG_SID }}
TEMPLE_WALLET_API_URL: ${{ vars.TEMPLE_WALLET_API_URL }}
TEMPLE_WALLET_STAKING_API_URL: ${{ vars.TEMPLE_WALLET_STAKING_API_URL }}
TEZOS_METADATA_API_URL: ${{ vars.TEZOS_METADATA_API_URL }}
TEZOS_DEXES_API_URL: ${{ vars.TEZOS_DEXES_API_URL }}
FIREBASE_GOOGLE_SERVICE_ANDROID: ${{ secrets.FIREBASE_GOOGLE_SERVICE_ANDROID }}
FIREBASE_GOOGLE_SERVICE_IOS: ${{ secrets.FIREBASE_GOOGLE_SERVICE_IOS }}
DYNAMIC_LINKS_DOMAIN_URI_PREFIX: ${{ secrets.DYNAMIC_LINKS_DOMAIN_URI_PREFIX }}
HYPELAB_AD_FRAME_URL: ${{ vars.HYPELAB_AD_FRAME_URL }}
HYPELAB_SMALL_PLACEMENT_SLUG: ${{ vars.HYPELAB_SMALL_PLACEMENT_SLUG }}
HYPELAB_NATIVE_PLACEMENT_SLUG: ${{ vars.HYPELAB_NATIVE_PLACEMENT_SLUG }}
PERSONA_PLACEMENT_SLUG: ${{ vars.PERSONA_PLACEMENT_SLUG }}
APPSTORE_AUTHKEY: ${{ secrets.APPSTORE_AUTHKEY }}
GOOGLE_PLAY_AUTHKEY: ${{ secrets.GOOGLE_PLAY_AUTHKEY }}
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
# Android
- name: Setup Java SDK
if: ${{ github.event.inputs.android == 'true' }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Update Android version
if: ${{ github.event.inputs.android == 'true' }}
uses: damienaicheh/update-android-version-gradle-action@v1.0.0
with:
build-gradle-path: android/app/build.gradle
version-name: ${{ github.event.inputs.version }}
version-code: ${{ github.event.inputs.build-number }}
- name: Build Android
if: ${{ github.event.inputs.android == 'true' }}
run: yarn android:release:apk
- name: Retain Android artifact
uses: actions/upload-artifact@v4
with:
name: android
path: android/app/build/outputs/apk/release/app-release.apk
if-no-files-found: warn
retention-days: 30
- name: Upload Android artifact to TestApp.io
if: ${{ github.event.inputs.android == 'true' }}
uses: testappio/github-action@v5
with:
api_token: ${{ secrets.TESTAPPIO_API_TOKEN }}
app_id: ${{ secrets.TESTAPPIO_APP_ID }}
file: android/app/build/outputs/apk/release/app-release.apk
release_notes: ${{env.GIT_BRANCH_NAME}} Android
git_release_notes: false
include_git_commit_id: false
notify: true
# iOS
- name: Enable automatic code signing
run: cd ios && ./enable_automatic_code_signing.sh
- name: Install Pods
if: ${{ github.event.inputs.ios == 'true' }}
run: |
export NO_FLIPPER=1
yarn ios:pods
- name: Update iOS version
if: ${{ github.event.inputs.ios == 'true' }}
uses: damienaicheh/update-ios-version-info-plist-action@v1.0.0
with:
info-plist-path: ios/TempleWallet/Info.plist
bundle-short-version-string: ${{ github.event.inputs.version }}
bundle-version: ${{ github.event.inputs.build-number }}
- name: Build iOS
if: ${{ github.event.inputs.ios == 'true' }}
uses: yukiarrr/ios-build-action@v1.5.0
with:
project-path: ios/TempleWallet.xcodeproj
workspace-path: ios/TempleWallet.xcworkspace
scheme: TempleWallet
export-method: ad-hoc
export-options: ios/TempleWallet/TestAppExportOptions.plist
configuration: Release
output-path: ios/build/TempleWallet.ipa
p12-base64: ${{ secrets.P12_BASE64 }}
certificate-password: ${{ secrets.P12_PASSWORD }}
mobileprovision-base64: ${{ secrets.ADHOC_MOBILEPROVISION_BASE64 }}
code-signing-identity: ${{ secrets.CODE_SIGNING_IDENTITY }}
team-id: ${{ secrets.TEAM_ID }}
- name: Retain iOS artifact
uses: actions/upload-artifact@v4
with:
name: ios
path: ios/build/TempleWallet.ipa
if-no-files-found: warn
retention-days: 30
- name: Upload iOS artifact to TestApp.io
if: ${{ github.event.inputs.ios == 'true' }}
uses: testappio/github-action@v5
with:
api_token: ${{ secrets.TESTAPPIO_API_TOKEN }}
app_id: ${{ secrets.TESTAPPIO_APP_ID }}
file: ios/build/TempleWallet.ipa
release_notes: ${{env.GIT_BRANCH_NAME}} iOS
git_release_notes: false
include_git_commit_id: false
notify: true