-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
77 lines (76 loc) · 3.31 KB
/
codemagic.yaml
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
workflows:
ios-release:
name: iOS production release
max_build_duration: 45
integrations:
app_store_connect: DevFin API Key
environment:
ios_signing:
provisioning_profiles:
- DevFin Profile
certificates:
- DevFin Apple Cert
groups:
- code-signing
vars:
XCODE_WORKSPACE: "ios/Runner.xcworkspace" # <-- Put your encrypted Certificate Private Key here
# Environment variable values provided when triggering build with Codemagic API. Alternatively add the required values below.
APP_STORE_APP_ID: 6476280284 # <-- Put the app id number here. This is found in App Store Connect > App > General > App Information
XCODE_CONFIG: Release-production # <-- Put the Xcode configuration here. This is found in Xcode > Project > Info > Configurations
XCODE_SCHEME: production # <-- Put the Xcode scheme here. This is found in Xcode > Product > Scheme > Edit Scheme
BUNDLE_ID: com.negandev.devfin # <-- Put the bundle id here. This is found in Xcode > Runner [Target] > General > Identity > Bundle Identifier
ENTRY_POINT: lib/main_production.dart
flutter: 3.16.0
xcode: 15.1 # <-- set to specific version e.g. 14.3, 15.0 to avoid unexpected updates.
cocoapods: default
# triggering:
# events:
# - push
# branch_patterns:
# - pattern: "main"
# include: true
# source: true
scripts:
- name: Get Flutter Packages
script: |
flutter packages pub get
- name: Pod install
script: |
find . -name "Podfile" -execdir pod install \;
- name: Set up keychain to be used for codesigning using Codemagic CLI 'keychain' command
script: |
keychain initialize
- name: Fetch signing files
script: |
app-store-connect fetch-signing-files "$BUNDLE_ID" --type IOS_APP_STORE --create
- name: Add certs to keychain
script: |
keychain add-certificates
- name: Set up code signing settings on Xcode project
script: |
xcode-project use-profiles
- name: Increment build number
script: |
cd $CM_BUILD_DIR/ios
LATEST_BUILD_NUMBER=$(app-store-connect get-latest-testflight-build-number "$APP_ID")
agvtool new-version -all $(($LATEST_BUILD_NUMBER + 1))
- name: Flutter build ipa and automatic versioning
script: |
flutter build ipa --release --flavor="$XCODE_SCHEME" -t "$ENTRY_POINT" \
--export-options-plist=/Users/builder/export_options.plist \
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- flutter_drive.log
- $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM
publishing:
email:
recipients:
- huykgit98@gmail.com
notify:
success: true
failure: true
app_store_connect: # checkout https://docs.codemagic.io/yaml-publishing/app-store-connect/ for more information
auth: integration
submit_to_testflight: true # Optional boolean, defaults to false. Whether or not to submit the uploaded build to TestFlight beta review. Required for distributing to beta groups. Note: This action is performed during post-processing.
expire_build_submitted_for_review: true