|
| 1 | +workflows: |
| 2 | + ios-workflow: |
| 3 | + name: iOS Workflow |
| 4 | + max_build_duration: 120 |
| 5 | + instance_type: mac_mini_m1 |
| 6 | + integrations: |
| 7 | + app_store_connect: codemagic |
| 8 | + environment: |
| 9 | + ios_signing: |
| 10 | + distribution_type: development |
| 11 | + bundle_identifier: caspernyong.FrameExtractionTool |
| 12 | + vars: |
| 13 | + XCODE_WORKSPACE: "FrameExtractionTool.xcodeproj" |
| 14 | + XCODE_SCHEME: "FrameExtractionTool" |
| 15 | + BUNDLE_ID: "caspernyong.FrameExtractionTool" |
| 16 | + APP_ID: 6504388104 # <-- Put your App ID here |
| 17 | + xcode: latest |
| 18 | + cocoapods: default |
| 19 | + scripts: |
| 20 | + - name: Set up code signing settings on Xcode project |
| 21 | + script: | |
| 22 | + xcode-project use-profiles |
| 23 | + - name: Get CocoaPods sources |
| 24 | + script: | |
| 25 | + if [ -f "Podfile" ]; then |
| 26 | + pod install |
| 27 | + else |
| 28 | + echo "No Podfile found, skipping CocoaPods installation" |
| 29 | + fi |
| 30 | + - name: Build ipa for distribution |
| 31 | + script: | |
| 32 | + xcode-project build-ipa \ |
| 33 | + --workspace "$XCODE_WORKSPACE" \ |
| 34 | + --scheme "$XCODE_SCHEME" \ |
| 35 | + --archive-flags="-destination 'generic/platform=iOS'" \ |
| 36 | + --export-options-plist export_options.plist |
| 37 | + artifacts: |
| 38 | + - build/ios/ipa/*.ipa |
| 39 | + - /tmp/xcodebuild_logs/*.log |
| 40 | + - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.app |
| 41 | + - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM |
| 42 | + publishing: |
| 43 | + email: |
| 44 | + recipients: |
| 45 | + - casperong@example.com # Update with your email |
| 46 | + notify: |
| 47 | + success: true |
| 48 | + failure: true |
| 49 | + slack: |
| 50 | + channel: '#builds' |
| 51 | + notify_on_build_start: true |
| 52 | + notify: |
| 53 | + success: true |
| 54 | + failure: true |
| 55 | + |
| 56 | + ios-unsigned-workflow: |
| 57 | + name: iOS Unsigned Build |
| 58 | + max_build_duration: 60 |
| 59 | + instance_type: mac_mini_m1 |
| 60 | + environment: |
| 61 | + vars: |
| 62 | + XCODE_WORKSPACE: "FrameExtractionTool.xcodeproj" |
| 63 | + XCODE_SCHEME: "FrameExtractionTool" |
| 64 | + BUNDLE_ID: "caspernyong.FrameExtractionTool" |
| 65 | + xcode: latest |
| 66 | + cocoapods: default |
| 67 | + scripts: |
| 68 | + - name: Get CocoaPods sources |
| 69 | + script: | |
| 70 | + if [ -f "Podfile" ]; then |
| 71 | + pod install |
| 72 | + else |
| 73 | + echo "No Podfile found, skipping CocoaPods installation" |
| 74 | + fi |
| 75 | + - name: Build unsigned archive |
| 76 | + script: | |
| 77 | + set -e |
| 78 | + xcodebuild \ |
| 79 | + -project "$XCODE_WORKSPACE" \ |
| 80 | + -scheme "$XCODE_SCHEME" \ |
| 81 | + -configuration Release \ |
| 82 | + -destination "generic/platform=iOS" \ |
| 83 | + -archivePath "build/FrameExtractionTool.xcarchive" \ |
| 84 | + archive \ |
| 85 | + CODE_SIGNING_REQUIRED=NO \ |
| 86 | + CODE_SIGNING_ALLOWED=NO \ |
| 87 | + CODE_SIGN_IDENTITY="" \ |
| 88 | + PROVISIONING_PROFILE="" \ |
| 89 | + DEVELOPMENT_TEAM="" |
| 90 | + - name: Create unsigned IPA |
| 91 | + script: | |
| 92 | + set -e |
| 93 | + mkdir -p build/Payload |
| 94 | + cp -r "build/FrameExtractionTool.xcarchive/Products/Applications/FrameExtractionTool.app" "build/Payload/" |
| 95 | + cd build |
| 96 | + zip -r "FrameExtractionTool-unsigned.ipa" "Payload/" |
| 97 | + ls -la FrameExtractionTool-unsigned.ipa |
| 98 | + - name: Verify IPA structure |
| 99 | + script: | |
| 100 | + cd build |
| 101 | + unzip -l FrameExtractionTool-unsigned.ipa | head -20 |
| 102 | + artifacts: |
| 103 | + - build/FrameExtractionTool-unsigned.ipa |
| 104 | + - build/FrameExtractionTool.xcarchive |
| 105 | + - /tmp/xcodebuild_logs/*.log |
| 106 | + publishing: |
| 107 | + email: |
| 108 | + recipients: |
| 109 | + - casperong@example.com # Update with your email |
| 110 | + notify: |
| 111 | + success: true |
| 112 | + failure: true |
| 113 | + |
| 114 | + ios-release-workflow: |
| 115 | + name: iOS Release Workflow |
| 116 | + max_build_duration: 120 |
| 117 | + instance_type: mac_mini_m1 |
| 118 | + triggering: |
| 119 | + events: |
| 120 | + - tag |
| 121 | + tag_patterns: |
| 122 | + - pattern: 'v*' |
| 123 | + include: true |
| 124 | + integrations: |
| 125 | + app_store_connect: codemagic |
| 126 | + environment: |
| 127 | + ios_signing: |
| 128 | + distribution_type: app_store |
| 129 | + bundle_identifier: caspernyong.FrameExtractionTool |
| 130 | + vars: |
| 131 | + XCODE_WORKSPACE: "FrameExtractionTool.xcodeproj" |
| 132 | + XCODE_SCHEME: "FrameExtractionTool" |
| 133 | + BUNDLE_ID: "caspernyong.FrameExtractionTool" |
| 134 | + APP_ID: 6504388104 # <-- Put your App ID here |
| 135 | + xcode: latest |
| 136 | + cocoapods: default |
| 137 | + scripts: |
| 138 | + - name: Set up code signing settings on Xcode project |
| 139 | + script: | |
| 140 | + xcode-project use-profiles |
| 141 | + - name: Get CocoaPods sources |
| 142 | + script: | |
| 143 | + if [ -f "Podfile" ]; then |
| 144 | + pod install |
| 145 | + else |
| 146 | + echo "No Podfile found, skipping CocoaPods installation" |
| 147 | + fi |
| 148 | + - name: Increment build number |
| 149 | + script: | |
| 150 | + cd $CM_BUILD_DIR |
| 151 | + LATEST_BUILD_NUMBER=$(app-store-connect get-latest-app-store-build-number "$APP_ID") |
| 152 | + agvtool new-version -all $(($LATEST_BUILD_NUMBER + 1)) |
| 153 | + - name: Build ipa for distribution |
| 154 | + script: | |
| 155 | + xcode-project build-ipa \ |
| 156 | + --workspace "$XCODE_WORKSPACE" \ |
| 157 | + --scheme "$XCODE_SCHEME" \ |
| 158 | + --archive-flags="-destination 'generic/platform=iOS'" |
| 159 | + artifacts: |
| 160 | + - build/ios/ipa/*.ipa |
| 161 | + - /tmp/xcodebuild_logs/*.log |
| 162 | + - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM |
| 163 | + publishing: |
| 164 | + # Uncomment when ready for App Store submission |
| 165 | + # app_store_connect: |
| 166 | + # auth: integration |
| 167 | + # submit_to_app_store: false |
| 168 | + # submit_to_testflight: true |
| 169 | + email: |
| 170 | + recipients: |
| 171 | + - casperong@example.com # Update with your email |
| 172 | + notify: |
| 173 | + success: true |
| 174 | + failure: true |
| 175 | + slack: |
| 176 | + channel: '#releases' |
| 177 | + notify_on_build_start: true |
| 178 | + notify: |
| 179 | + success: true |
| 180 | + failure: true |
0 commit comments