Skip to content

Commit

Permalink
chore: setup ios pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
adityastic committed Jan 6, 2025
1 parent 1d8098a commit fa51bb2
Show file tree
Hide file tree
Showing 124 changed files with 404 additions and 162 deletions.
23 changes: 20 additions & 3 deletions .github/actions/ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,27 @@ runs:
with:
cache: true

- name: Build iOS IPA
- name: Update Podfile
shell: bash
run: |
cd ./iOS
flutter pub get
pod install --repo-update
- name: Build iOS IPA (No Code Signing for PRs)
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
VERSION_NAME: ${{inputs.VERSION_NAME}}
VERSION_CODE: ${{inputs.VERSION_CODE}}
VERSION_NAME: ${{ inputs.VERSION_NAME }}
VERSION_CODE: ${{ inputs.VERSION_CODE }}
run: |
flutter build ipa --no-codesign --build-name $VERSION_NAME --build-number $VERSION_CODE
- name: Build iOS IPA (With Code Signing)
if: ${{ github.event_name != 'pull_request' }}
shell: bash
env:
VERSION_NAME: ${{ inputs.VERSION_NAME }}
VERSION_CODE: ${{ inputs.VERSION_CODE }}
run: |
flutter build ipa --build-name $VERSION_NAME --build-number $VERSION_CODE
49 changes: 33 additions & 16 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:

- name: Pre Checks
run: |
bash scripts/check-screenshots.sh
bash scripts/check-android-screenshots.sh
- name: Prepare Build Keys
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
env:
ENCRYPTED_F10B5E0E5262_IV: ${{ secrets.ENCRYPTED_F10B5E0E5262_IV }}
ENCRYPTED_F10B5E0E5262_KEY: ${{ secrets.ENCRYPTED_F10B5E0E5262_KEY }}
run: |
bash scripts/prep-key.sh
bash scripts/prep-android-key.sh
- name: Android Workflow
uses: ./.github/actions/android
Expand Down Expand Up @@ -136,23 +136,11 @@ jobs:
git branch -m apk
git push --force origin apk
- name: Setup Ruby
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Prepare Bundler
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Push app in open testing track
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
run: |
bundle exec fastlane uploadToOpenTesting
cd ./android
fastlane uploadToOpenTesting
if [[ $? -ne 0 ]]; then
exit 1
fi
Expand All @@ -164,11 +152,40 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Prepare Build Keys
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
env:
ENCRYPTED_IOS_IV: ${{ secrets.ENCRYPTED_IOS_IV }}
ENCRYPTED_IOS_KEY: ${{ secrets.ENCRYPTED_IOS_KEY }}
run: |
bash scripts/prep-ios-key.sh
- name: Setup Certs
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
run: |
cd ./iOS
fastlane setupCertificates
if [[ $? -ne 0 ]]; then
exit 1
fi
- name: iOS Workflow
uses: ./.github/actions/ios
with:
VERSION_NAME: ${{needs.common.outputs.VERSION_NAME}}
VERSION_CODE: ${{needs.common.outputs.VERSION_CODE}}

- name: Push app to testflight
if: ${{ github.repository == 'fossasia/badgemagic-app' }}
run: |
cd ./iOS
fastlane uploadToBeta
if [[ $? -ne 0 ]]; then
exit 1
fi
update-release:
name: Update Draft Release
Expand Down
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks
fastlane.json
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="badgemagic"
android:label="Badge Magic"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
2 changes: 2 additions & 0 deletions android/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json_key_file("./fastlane.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("org.fossasia.badgemagic") # e.g. com.krausefx.app
9 changes: 9 additions & 0 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
default_platform(:android)
platform :android do
lane :uploadToOpenTesting do
upload_to_play_store(track: "beta",aab:"../build/app/outputs/bundle/release/app-release.aab")
end
lane :uploadToClosedTesting do
upload_to_play_store(track: "alpha",aab:"../build/app/outputs/bundle/release/app-release.aab")
end
end
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions fastlane/Appfile

This file was deleted.

9 changes: 0 additions & 9 deletions fastlane/Fastfile

This file was deleted.

3 changes: 3 additions & 0 deletions iOS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ Runner/GeneratedPluginRegistrant.*
!default.mode2v3
!default.pbxuser
!default.perspectivev3

vendor/
fastlane.json
78 changes: 75 additions & 3 deletions iOS/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,100 @@
PODS:
- DKImagePickerController/Core (4.3.9):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.9)
- DKImagePickerController/PhotoGallery (4.3.9):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.3.9)
- DKPhotoGallery (0.0.19):
- DKPhotoGallery/Core (= 0.0.19)
- DKPhotoGallery/Model (= 0.0.19)
- DKPhotoGallery/Preview (= 0.0.19)
- DKPhotoGallery/Resource (= 0.0.19)
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Core (0.0.19):
- DKPhotoGallery/Model
- DKPhotoGallery/Preview
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Model (0.0.19):
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Preview (0.0.19):
- DKPhotoGallery/Model
- DKPhotoGallery/Resource
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Resource (0.0.19):
- SDWebImage
- SwiftyGif
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- flutter_blue_plus (0.0.1):
- Flutter
- integration_test (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- SDWebImage (5.20.0):
- SDWebImage/Core (= 5.20.0)
- SDWebImage/Core (5.20.0)
- share_plus (0.0.1):
- Flutter
- SwiftyGif (5.4.5)
- url_launcher_ios (0.0.1):
- Flutter

DEPENDENCIES:
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- SDWebImage
- SwiftyGif

EXTERNAL SOURCES:
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
flutter_blue_plus:
:path: ".symlinks/plugins/flutter_blue_plus/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
flutter_blue_plus: e5808fc4e5ebc58bb911635f8fdaf5e2b4da2754
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
22 changes: 16 additions & 6 deletions iOS/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 56AJ49327U;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Badge Magic";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore org.fossasia.badgemagic.ios";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -495,7 +498,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -513,7 +516,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand All @@ -529,7 +532,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand Down Expand Up @@ -661,7 +664,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -676,16 +679,23 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 56AJ49327U;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Badge Magic";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic;
PRODUCT_BUNDLE_IDENTIFIER = org.fossasia.badgemagic.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore org.fossasia.badgemagic.ios";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down
2 changes: 1 addition & 1 deletion iOS/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import UIKit
import Flutter
import integration_test

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fa51bb2

Please sign in to comment.