Skip to content

Commit b3333e8

Browse files
clangenbpifragile
andauthored
Publish beta branch to appstore connect from Github Actions (#1727)
* [CI] add first draft to publish to playconsole from Github Actions * [CI] add first draft to publish to Appstore Connect * [CI] executie IOS publish on this branch for testing * [CI] update IOS secret names * [CI] fix branch condition for ios publish * [CI] fix branch condition for ios publish * [CI] use new action for uploading to appstore connect * [CI] try new way of publishing * [CI] fix melos IOS build command * [CI] skip duplicate signing setup * [CI] use manual way of signing * try fixing the paths * use code signing setup from github docs * try another action * Revert "try another action" This reverts commit f5cdf02. * Set `-destination` to generic ios platform * fix xcode build command * try signing with flutter * remove deprecated flag for build command * try setting flutter signing flags * try setting flutter signing flags * try manual signing again, add export options file * fix melos command * fix IPHONEOS_DEPLOYMENT_TARGET to 12 * print available provisioning profiles * fix path * create ExportOptions.plist in the CI * fix path * fix naming of mobileProvisioning file * set .plist file while building * fix command * try fix command * try new cmd * try fix command * print some more debug logs * print some more debug logs * print some more debug logs * print some more debug logs * make platform target 12 * show export options.plist * Fix export options.plist * add code sign identity * make code signing automatic for deps * more debug logs * remove code signing for deps * try setting cocoapod * try building with new flutter action * try fix command * remove deprecated argument * try fixing th provisioning profile * try fixing th provisioning profile * try fixing th provisioning profile * try fixing th provisioning profile * re-introduce --export-options-plist flag * fix typo * try fix export option-plist flag * try to build with flutter version from CI * fix cmd * try rename provisioning profile * doc * try fix provisioning profil * try fix provisioning profil * try fix provisioning profil * ios chages * revert unnecessary changes * try fix exportoptions.plist * debug print available profiles * fix debug print * add provisioning profile specifier to pbxproj * closer match to moonchain file * add profile to release too * add env vars * fix code sign identity * try fixing file path * fix appstore connect secrets * fix appstore connect secrets 2 * fix appstore connect secrets 3 * Use an action to upload the ipa * remove google upload * better doc * add better doc * [CI] run signed build also on push/PRs on master, but only deploy when there is a commit on beta * [CI] rename workflow --------- Co-authored-by: pifragile <pigu@bluewin.ch>
1 parent 4378995 commit b3333e8

File tree

9 files changed

+126
-35
lines changed

9 files changed

+126
-35
lines changed
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: IOS Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [ master, beta ]
6+
tags:
7+
- "*"
8+
pull_request:
9+
branches: [ master, beta ]
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: macos-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Install flutter wrapper
20+
run: ./scripts/install_flutter_wrapper.sh
21+
22+
- name: Get dependencies (i.e., melos)
23+
run: .flutter/bin/dart pub get
24+
25+
- name: Melos Bootstrap
26+
run: .flutter/bin/dart run melos bootstrap
27+
28+
# The cedvdb action can't use flutter wrapper.
29+
- name: Set up Flutter
30+
uses: subosito/flutter-action@v2
31+
with:
32+
channel: stable
33+
flutter-version-file: pubspec.yaml
34+
35+
- name: iOS Application Building...
36+
uses: cedvdb/action-flutter-build-ios@v1
37+
with:
38+
build-cmd: cd app && flutter build ipa --release --export-options-plist=ios/ExportOptions.plist
39+
certificate-base64: ${{ secrets.CERT_P12_BASE64 }}
40+
certificate-password: ${{ secrets.CERT_P12_PASSWORD }}
41+
provisioning-profile-base64: ${{ secrets.MOBILE_PROVISION_BASE64 }}
42+
keychain-password: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
43+
44+
# Used for debugging
45+
# - name: Show available provisioning profiles
46+
# if: always()
47+
# run: |
48+
# cargo install --git https://github.com/juwens/pputil.git
49+
# pputil list
50+
# pputil list-ext
51+
52+
- name: Show Generated files
53+
run: |
54+
ls app/build/ios/ipa
55+
56+
# This will fail if the version and build number in the app/pubspec.yaml
57+
# is not monotonically increasing compared to the last released version.
58+
- name: 'Upload app to TestFlight'
59+
# Only deploy if we are on beta
60+
if: github.ref == 'refs/heads/beta'
61+
uses: apple-actions/upload-testflight-build@v1
62+
with:
63+
app-path: app/build/ios/ipa/Encointerwallet.ipa
64+
issuer-id: ${{ secrets.APP_STORE_ISSUER_ID }}
65+
api-key-id: ${{ secrets.APP_STORE_KEY_ID }}
66+
api-private-key: ${{ secrets.APP_STORE_PRIVATE_KEY }}

app/ios/ExportOptions.plist

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>compileBitcode</key>
6+
<true/>
7+
<key>method</key>
8+
<string>app-store</string>
9+
<key>provisioningProfiles</key>
10+
<dict>
11+
<key>org.encointer.wallet</key>
12+
<string>Encointer_AppStore_Deployment.mobileprovision</string>
13+
</dict>
14+
<key>signingCertificate</key>
15+
<string>iOS Distribution</string>
16+
<key>signingStyle</key>
17+
<string>manual</string>
18+
<key>stripSwiftSymbols</key>
19+
<true/>
20+
<key>teamID</key>
21+
<string>R3B3857K83</string>
22+
<key>thinning</key>
23+
<string>&lt;none&gt;</string>
24+
</dict>
25+
</plist>

app/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

app/ios/Podfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
platform :ios, '11.0'
2+
platform :ios, '12.0'
33
# source 'https://github.com/CocoaPods/Specs.git'
44

55
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
@@ -39,6 +39,8 @@ post_install do |installer|
3939
installer.pods_project.targets.each do |target|
4040
flutter_additional_ios_build_settings(target)
4141

42+
puts "Configuring #{target.name}..."
43+
4244
target.build_configurations.each do |config|
4345
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
4446
'$(inherited)',
@@ -70,4 +72,4 @@ post_install do |installer|
7072
]
7173
end
7274
end
73-
end
75+
end

app/ios/Podfile.lock

+4-18
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ PODS:
1111
- device_info_plus (0.0.1):
1212
- Flutter
1313
- Flutter (1.0.0)
14-
- flutter_inappwebview (0.0.1):
15-
- Flutter
16-
- flutter_inappwebview/Core (= 0.0.1)
17-
- OrderedSet (~> 5.0)
18-
- flutter_inappwebview/Core (0.0.1):
19-
- Flutter
20-
- OrderedSet (~> 5.0)
2114
- flutter_local_notifications (0.0.1):
2215
- Flutter
2316
- flutter_secure_storage (6.0.0):
@@ -82,7 +75,6 @@ PODS:
8275
- nanopb/encode (= 2.30909.0)
8376
- nanopb/decode (2.30909.0)
8477
- nanopb/encode (2.30909.0)
85-
- OrderedSet (5.0.0)
8678
- package_info_plus (0.4.5):
8779
- Flutter
8880
- path_provider_foundation (0.0.1):
@@ -113,7 +105,6 @@ DEPENDENCIES:
113105
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
114106
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
115107
- Flutter (from `Flutter`)
116-
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
117108
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
118109
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
119110
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
@@ -142,7 +133,6 @@ SPEC REPOS:
142133
- MLKitCommon
143134
- MLKitVision
144135
- nanopb
145-
- OrderedSet
146136
- PromisesObjC
147137
- ReachabilitySwift
148138

@@ -159,8 +149,6 @@ EXTERNAL SOURCES:
159149
:path: ".symlinks/plugins/device_info_plus/ios"
160150
Flutter:
161151
:path: Flutter
162-
flutter_inappwebview:
163-
:path: ".symlinks/plugins/flutter_inappwebview/ios"
164152
flutter_local_notifications:
165153
:path: ".symlinks/plugins/flutter_local_notifications/ios"
166154
flutter_secure_storage:
@@ -196,9 +184,8 @@ SPEC CHECKSUMS:
196184
app_links: 5ef33d0d295a89d9d16bb81b0e3b0d5f70d6c875
197185
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
198186
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
199-
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
200-
flutter_inappwebview: 166ed136c90e43c69b451f6d825da379be66c847
201-
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
187+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
188+
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
202189
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
203190
flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb
204191
GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd
@@ -214,7 +201,6 @@ SPEC CHECKSUMS:
214201
MLKitVision: 8baa5f46ee3352614169b85250574fde38c36f49
215202
mobile_scanner: 202ab6f652e40a9add68b10de4c4fb2a745c4348
216203
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
217-
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
218204
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
219205
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
220206
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
@@ -227,6 +213,6 @@ SPEC CHECKSUMS:
227213
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
228214
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
229215

230-
PODFILE CHECKSUM: 90aee035b683484f7e14ac9a57b7dc9185377dcb
216+
PODFILE CHECKSUM: 0c2d9882b1c178df36915b743af86ecf6fa05ca3
231217

232-
COCOAPODS: 1.13.0
218+
COCOAPODS: 1.15.2

app/ios/Runner.xcodeproj/project.pbxproj

+10-10
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
97C146E61CF9000F007C117D /* Project object */ = {
178178
isa = PBXProject;
179179
attributes = {
180-
LastUpgradeCheck = 1430;
180+
LastUpgradeCheck = 1510;
181181
ORGANIZATIONNAME = "The Chromium Authors";
182182
TargetAttributes = {
183183
97C146ED1CF9000F007C117D = {
@@ -233,15 +233,13 @@
233233
"${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework",
234234
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
235235
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
236-
"${BUILT_PRODUCTS_DIR}/OrderedSet/OrderedSet.framework",
237236
"${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework",
238237
"${BUILT_PRODUCTS_DIR}/ReachabilitySwift/Reachability.framework",
239238
"${BUILT_PRODUCTS_DIR}/add_2_calendar/add_2_calendar.framework",
240239
"${BUILT_PRODUCTS_DIR}/aes_ecb_pkcs5_flutter/aes_ecb_pkcs5_flutter.framework",
241240
"${BUILT_PRODUCTS_DIR}/app_links/app_links.framework",
242241
"${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework",
243242
"${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework",
244-
"${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework",
245243
"${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework",
246244
"${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework",
247245
"${BUILT_PRODUCTS_DIR}/flutter_timezone/flutter_timezone.framework",
@@ -262,15 +260,13 @@
262260
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework",
263261
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
264262
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
265-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OrderedSet.framework",
266263
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework",
267264
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
268265
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/add_2_calendar.framework",
269266
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/aes_ecb_pkcs5_flutter.framework",
270267
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/app_links.framework",
271268
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework",
272269
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework",
273-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework",
274270
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework",
275271
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework",
276272
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_timezone.framework",
@@ -405,7 +401,7 @@
405401
CLANG_WARN_SUSPICIOUS_MOVE = YES;
406402
CLANG_WARN_UNREACHABLE_CODE = YES;
407403
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
408-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
404+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution";
409405
COPY_PHASE_STRIP = NO;
410406
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
411407
ENABLE_NS_ASSERTIONS = NO;
@@ -418,7 +414,7 @@
418414
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
419415
GCC_WARN_UNUSED_FUNCTION = YES;
420416
GCC_WARN_UNUSED_VARIABLE = YES;
421-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
417+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
422418
MTL_ENABLE_DEBUG_INFO = NO;
423419
SDKROOT = iphoneos;
424420
SUPPORTED_PLATFORMS = iphoneos;
@@ -452,6 +448,8 @@
452448
);
453449
PRODUCT_BUNDLE_IDENTIFIER = org.encointer.wallet;
454450
PRODUCT_NAME = Runner;
451+
PROVISIONING_PROFILE_SPECIFIER = Encointer_AppStore_Deployment.mobileprovision;
452+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = Encointer_AppStore_Deployment.mobileprovision;
455453
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
456454
SWIFT_VERSION = 5.0;
457455
VERSIONING_SYSTEM = "apple-generic";
@@ -505,7 +503,7 @@
505503
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
506504
GCC_WARN_UNUSED_FUNCTION = YES;
507505
GCC_WARN_UNUSED_VARIABLE = YES;
508-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
506+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
509507
MTL_ENABLE_DEBUG_INFO = YES;
510508
ONLY_ACTIVE_ARCH = YES;
511509
SDKROOT = iphoneos;
@@ -541,7 +539,7 @@
541539
CLANG_WARN_SUSPICIOUS_MOVE = YES;
542540
CLANG_WARN_UNREACHABLE_CODE = YES;
543541
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
544-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
542+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution";
545543
COPY_PHASE_STRIP = NO;
546544
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
547545
ENABLE_NS_ASSERTIONS = NO;
@@ -554,7 +552,7 @@
554552
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
555553
GCC_WARN_UNUSED_FUNCTION = YES;
556554
GCC_WARN_UNUSED_VARIABLE = YES;
557-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
555+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
558556
MTL_ENABLE_DEBUG_INFO = NO;
559557
SDKROOT = iphoneos;
560558
SUPPORTED_PLATFORMS = iphoneos;
@@ -621,6 +619,8 @@
621619
);
622620
PRODUCT_BUNDLE_IDENTIFIER = org.encointer.wallet;
623621
PRODUCT_NAME = Runner;
622+
PROVISIONING_PROFILE_SPECIFIER = Encointer_AppStore_Deployment.mobileprovision;
623+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = Encointer_AppStore_Deployment.mobileprovision;
624624
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
625625
SWIFT_VERSION = 5.0;
626626
VERSIONING_SYSTEM = "apple-generic";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1430"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

melos.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,13 @@ scripts:
111111
run: cd app && flutter build apk --split-per-abi --flavor dev
112112
description: "Build an APK file"
113113

114-
build-appbundle:
115-
run: cd app && flutter build appbundle
116-
description: "Build an appbundle file"
114+
build-appbundle-release:
115+
run: cd app && flutter build appbundle --release
116+
description: "Build an appbundle file ready to be submitted to the google play console"
117+
118+
build-ipa-release:
119+
run: cd app && flutter build ios --release --export-options-plist ios/ExportOptions.plist
120+
description: "Build a signed IPA"
117121

118122
# Integration test Encointer Wallet
119123
integration-app-test-android:

0 commit comments

Comments
 (0)