Skip to content

Commit fa51bb2

Browse files
committed
chore: setup ios pipeline
1 parent 1d8098a commit fa51bb2

File tree

124 files changed

+404
-162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+404
-162
lines changed

.github/actions/ios/action.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,27 @@ runs:
1818
with:
1919
cache: true
2020

21-
- name: Build iOS IPA
21+
- name: Update Podfile
22+
shell: bash
23+
run: |
24+
cd ./iOS
25+
flutter pub get
26+
pod install --repo-update
27+
28+
- name: Build iOS IPA (No Code Signing for PRs)
29+
if: ${{ github.event_name == 'pull_request' }}
2230
shell: bash
2331
env:
24-
VERSION_NAME: ${{inputs.VERSION_NAME}}
25-
VERSION_CODE: ${{inputs.VERSION_CODE}}
32+
VERSION_NAME: ${{ inputs.VERSION_NAME }}
33+
VERSION_CODE: ${{ inputs.VERSION_CODE }}
2634
run: |
2735
flutter build ipa --no-codesign --build-name $VERSION_NAME --build-number $VERSION_CODE
36+
37+
- name: Build iOS IPA (With Code Signing)
38+
if: ${{ github.event_name != 'pull_request' }}
39+
shell: bash
40+
env:
41+
VERSION_NAME: ${{ inputs.VERSION_NAME }}
42+
VERSION_CODE: ${{ inputs.VERSION_CODE }}
43+
run: |
44+
flutter build ipa --build-name $VERSION_NAME --build-number $VERSION_CODE

.github/workflows/push.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ jobs:
6464

6565
- name: Pre Checks
6666
run: |
67-
bash scripts/check-screenshots.sh
67+
bash scripts/check-android-screenshots.sh
6868
6969
- name: Prepare Build Keys
7070
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
7171
env:
7272
ENCRYPTED_F10B5E0E5262_IV: ${{ secrets.ENCRYPTED_F10B5E0E5262_IV }}
7373
ENCRYPTED_F10B5E0E5262_KEY: ${{ secrets.ENCRYPTED_F10B5E0E5262_KEY }}
7474
run: |
75-
bash scripts/prep-key.sh
75+
bash scripts/prep-android-key.sh
7676
7777
- name: Android Workflow
7878
uses: ./.github/actions/android
@@ -136,23 +136,11 @@ jobs:
136136
git branch -m apk
137137
git push --force origin apk
138138
139-
- name: Setup Ruby
140-
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
141-
uses: ruby/setup-ruby@v1
142-
with:
143-
ruby-version: '3.3'
144-
bundler-cache: true
145-
146-
- name: Prepare Bundler
147-
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
148-
run: |
149-
bundle config path vendor/bundle
150-
bundle install --jobs 4 --retry 3
151-
152139
- name: Push app in open testing track
153140
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
154141
run: |
155-
bundle exec fastlane uploadToOpenTesting
142+
cd ./android
143+
fastlane uploadToOpenTesting
156144
if [[ $? -ne 0 ]]; then
157145
exit 1
158146
fi
@@ -164,11 +152,40 @@ jobs:
164152
steps:
165153
- uses: actions/checkout@v4
166154

155+
- name: Prepare Build Keys
156+
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
157+
env:
158+
ENCRYPTED_IOS_IV: ${{ secrets.ENCRYPTED_IOS_IV }}
159+
ENCRYPTED_IOS_KEY: ${{ secrets.ENCRYPTED_IOS_KEY }}
160+
run: |
161+
bash scripts/prep-ios-key.sh
162+
163+
- name: Setup Certs
164+
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
165+
env:
166+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
167+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
168+
run: |
169+
cd ./iOS
170+
fastlane setupCertificates
171+
if [[ $? -ne 0 ]]; then
172+
exit 1
173+
fi
174+
167175
- name: iOS Workflow
168176
uses: ./.github/actions/ios
169177
with:
170178
VERSION_NAME: ${{needs.common.outputs.VERSION_NAME}}
171179
VERSION_CODE: ${{needs.common.outputs.VERSION_CODE}}
180+
181+
- name: Push app to testflight
182+
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
183+
run: |
184+
cd ./iOS
185+
fastlane uploadToBeta
186+
if [[ $? -ne 0 ]]; then
187+
exit 1
188+
fi
172189
173190
update-release:
174191
name: Update Draft Release

android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ GeneratedPluginRegistrant.java
1111
key.properties
1212
**/*.keystore
1313
**/*.jks
14+
fastlane.json

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application
3-
android:label="badgemagic"
3+
android:label="Badge Magic"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity

android/fastlane/Appfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
json_key_file("./fastlane.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
2+
package_name("org.fossasia.badgemagic") # e.g. com.krausefx.app

android/fastlane/Fastfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
default_platform(:android)
2+
platform :android do
3+
lane :uploadToOpenTesting do
4+
upload_to_play_store(track: "beta",aab:"../build/app/outputs/bundle/release/app-release.aab")
5+
end
6+
lane :uploadToClosedTesting do
7+
upload_to_play_store(track: "alpha",aab:"../build/app/outputs/bundle/release/app-release.aab")
8+
end
9+
end

fastlane/Appfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

fastlane/Fastfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

iOS/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ Runner/GeneratedPluginRegistrant.*
3232
!default.mode2v3
3333
!default.pbxuser
3434
!default.perspectivev3
35+
36+
vendor/
37+
fastlane.json

iOS/Podfile.lock

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,100 @@
11
PODS:
2+
- DKImagePickerController/Core (4.3.9):
3+
- DKImagePickerController/ImageDataManager
4+
- DKImagePickerController/Resource
5+
- DKImagePickerController/ImageDataManager (4.3.9)
6+
- DKImagePickerController/PhotoGallery (4.3.9):
7+
- DKImagePickerController/Core
8+
- DKPhotoGallery
9+
- DKImagePickerController/Resource (4.3.9)
10+
- DKPhotoGallery (0.0.19):
11+
- DKPhotoGallery/Core (= 0.0.19)
12+
- DKPhotoGallery/Model (= 0.0.19)
13+
- DKPhotoGallery/Preview (= 0.0.19)
14+
- DKPhotoGallery/Resource (= 0.0.19)
15+
- SDWebImage
16+
- SwiftyGif
17+
- DKPhotoGallery/Core (0.0.19):
18+
- DKPhotoGallery/Model
19+
- DKPhotoGallery/Preview
20+
- SDWebImage
21+
- SwiftyGif
22+
- DKPhotoGallery/Model (0.0.19):
23+
- SDWebImage
24+
- SwiftyGif
25+
- DKPhotoGallery/Preview (0.0.19):
26+
- DKPhotoGallery/Model
27+
- DKPhotoGallery/Resource
28+
- SDWebImage
29+
- SwiftyGif
30+
- DKPhotoGallery/Resource (0.0.19):
31+
- SDWebImage
32+
- SwiftyGif
33+
- file_picker (0.0.1):
34+
- DKImagePickerController/PhotoGallery
35+
- Flutter
236
- Flutter (1.0.0)
337
- flutter_blue_plus (0.0.1):
438
- Flutter
539
- integration_test (0.0.1):
640
- Flutter
41+
- path_provider_foundation (0.0.1):
42+
- Flutter
43+
- FlutterMacOS
44+
- SDWebImage (5.20.0):
45+
- SDWebImage/Core (= 5.20.0)
46+
- SDWebImage/Core (5.20.0)
47+
- share_plus (0.0.1):
48+
- Flutter
49+
- SwiftyGif (5.4.5)
50+
- url_launcher_ios (0.0.1):
51+
- Flutter
752

853
DEPENDENCIES:
54+
- file_picker (from `.symlinks/plugins/file_picker/ios`)
955
- Flutter (from `Flutter`)
1056
- flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`)
1157
- integration_test (from `.symlinks/plugins/integration_test/ios`)
58+
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
59+
- share_plus (from `.symlinks/plugins/share_plus/ios`)
60+
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
61+
62+
SPEC REPOS:
63+
trunk:
64+
- DKImagePickerController
65+
- DKPhotoGallery
66+
- SDWebImage
67+
- SwiftyGif
1268

1369
EXTERNAL SOURCES:
70+
file_picker:
71+
:path: ".symlinks/plugins/file_picker/ios"
1472
Flutter:
1573
:path: Flutter
1674
flutter_blue_plus:
1775
:path: ".symlinks/plugins/flutter_blue_plus/ios"
1876
integration_test:
1977
:path: ".symlinks/plugins/integration_test/ios"
78+
path_provider_foundation:
79+
:path: ".symlinks/plugins/path_provider_foundation/darwin"
80+
share_plus:
81+
:path: ".symlinks/plugins/share_plus/ios"
82+
url_launcher_ios:
83+
:path: ".symlinks/plugins/url_launcher_ios/ios"
2084

2185
SPEC CHECKSUMS:
86+
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
87+
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
88+
file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
2289
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
23-
flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96
24-
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
90+
flutter_blue_plus: e5808fc4e5ebc58bb911635f8fdaf5e2b4da2754
91+
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
92+
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
93+
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
94+
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
95+
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
96+
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
2597

2698
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
2799

28-
COCOAPODS: 1.15.2
100+
COCOAPODS: 1.16.2

iOS/Runner.xcodeproj/project.pbxproj

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,19 @@
470470
buildSettings = {
471471
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472472
CLANG_ENABLE_MODULES = YES;
473+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
473474
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
475+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 56AJ49327U;
474476
ENABLE_BITCODE = NO;
475477
INFOPLIST_FILE = Runner/Info.plist;
476478
INFOPLIST_KEY_CFBundleDisplayName = "Badge Magic";
477479
LD_RUNPATH_SEARCH_PATHS = (
478480
"$(inherited)",
479481
"@executable_path/Frameworks",
480482
);
481-
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic;
483+
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios;
482484
PRODUCT_NAME = "$(TARGET_NAME)";
485+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore org.fossasia.badgemagic.ios";
483486
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
484487
SWIFT_VERSION = 5.0;
485488
VERSIONING_SYSTEM = "apple-generic";
@@ -495,7 +498,7 @@
495498
CURRENT_PROJECT_VERSION = 1;
496499
GENERATE_INFOPLIST_FILE = YES;
497500
MARKETING_VERSION = 1.0;
498-
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.RunnerTests;
501+
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios.RunnerTests;
499502
PRODUCT_NAME = "$(TARGET_NAME)";
500503
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
501504
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -513,7 +516,7 @@
513516
CURRENT_PROJECT_VERSION = 1;
514517
GENERATE_INFOPLIST_FILE = YES;
515518
MARKETING_VERSION = 1.0;
516-
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.RunnerTests;
519+
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios.RunnerTests;
517520
PRODUCT_NAME = "$(TARGET_NAME)";
518521
SWIFT_VERSION = 5.0;
519522
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -529,7 +532,7 @@
529532
CURRENT_PROJECT_VERSION = 1;
530533
GENERATE_INFOPLIST_FILE = YES;
531534
MARKETING_VERSION = 1.0;
532-
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.RunnerTests;
535+
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios.RunnerTests;
533536
PRODUCT_NAME = "$(TARGET_NAME)";
534537
SWIFT_VERSION = 5.0;
535538
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@@ -661,7 +664,7 @@
661664
"$(inherited)",
662665
"@executable_path/Frameworks",
663666
);
664-
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic;
667+
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios;
665668
PRODUCT_NAME = "$(TARGET_NAME)";
666669
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
667670
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -676,16 +679,23 @@
676679
buildSettings = {
677680
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
678681
CLANG_ENABLE_MODULES = YES;
682+
CODE_SIGN_IDENTITY = "Apple Development";
683+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
684+
CODE_SIGN_STYLE = Manual;
679685
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
686+
DEVELOPMENT_TEAM = "";
687+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 56AJ49327U;
680688
ENABLE_BITCODE = NO;
681689
INFOPLIST_FILE = Runner/Info.plist;
682690
INFOPLIST_KEY_CFBundleDisplayName = "Badge Magic";
683691
LD_RUNPATH_SEARCH_PATHS = (
684692
"$(inherited)",
685693
"@executable_path/Frameworks",
686694
);
687-
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic;
695+
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios;
688696
PRODUCT_NAME = "$(TARGET_NAME)";
697+
PROVISIONING_PROFILE_SPECIFIER = "";
698+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore org.fossasia.badgemagic.ios";
689699
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
690700
SWIFT_VERSION = 5.0;
691701
VERSIONING_SYSTEM = "apple-generic";

iOS/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import UIKit
22
import Flutter
33
import integration_test
44

5-
@UIApplicationMain
5+
@main
66
@objc class AppDelegate: FlutterAppDelegate {
77
override func application(
88
_ application: UIApplication,

0 commit comments

Comments
 (0)