-
Notifications
You must be signed in to change notification settings - Fork 1
/
codemagic.yaml
134 lines (129 loc) · 3.99 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
definitions:
triggering:
push: &events
events:
- push
- pull_request
email: &email
email:
recipients:
notify:
success: true
failure: true
workflows:
musanovakit:
name: MusanovaKit Workflow
instance_type: mac_mini_m1
environment:
vars:
XCODE_SCHEME: "MusanovaKit"
APP_ID: "Musanova"
when:
changeset:
includes:
- "Sources"
- "Tests"
triggering:
<<: *events
scripts:
- name: Build Framework
script: |
#!/bin/zsh
declare -a DESTINATIONS=("platform=iOS Simulator,name=iPhone 14" "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)" "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" "platform=macOS")
for DESTINATION in "${DESTINATIONS[@]}"
do
xcodebuild clean build \
-scheme "$XCODE_SCHEME" \
-destination "$DESTINATION" \
-skipPackagePluginValidation
done
- name: Test Framework
script: |
#!/bin/zsh
declare -a DESTINATIONS=("platform=iOS Simulator,name=iPhone 14" "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)" "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" "platform=macOS")
for DESTINATION in "${DESTINATIONS[@]}"
do
set -o pipefail
xcodebuild clean test \
-scheme "$XCODE_SCHEME" \
-destination "$DESTINATION" \
-skipPackagePluginValidation | xcpretty --report junit
done
test_report: build/reports/junit.xml
publishing:
<<: *email
musanovakit-update-docs:
name: MusanovaKit Docs Update Workflow
environment:
groups:
- GitHub
when:
changeset:
includes:
- "Sources"
- "Musanova"
excludes:
- "**/*.md"
scripts:
- name: Update DocC Documentation
script: |
#!/bin/zsh
swift package --allow-writing-to-directory ./docs \
generate-documentation --target MusanovaKit \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path MusanovaKit \
--output-path ./docs
git add .
git commit -m "[skip ci] Update DocC Documentation"
git remote set-url origin https://rudrankriyam:[email protected]/rryam/MusanovaKit.git
git pull --ff-only
git push origin main
musanova:
name: Musanova TestFlight Workflow
working_directory: Musanova
instance_type: mac_mini_m1
environment:
ios_signing:
distribution_type: app_store
bundle_identifier: com.rudrankriyam.musanova-app
vars:
XCODE_PROJECT: "Musanova.xcodeproj"
XCODE_SCHEME: "Musanova"
APP_ID: "6447436367"
integrations:
app_store_connect: Rudrank ASC API Key
triggering:
<<: *events
when:
changeset:
includes:
- "Sources"
- "Musanova"
excludes:
- "**/*.md"
scripts:
- name: Set up provisioning profiles settings on Xcode project
script: xcode-project use-profiles
- name: Increment build number
script: |
LATEST_BUILD_NUMBER=$(app-store-connect get-latest-testflight-build-number "$APP_ID")
agvtool new-version -all $(($LATEST_BUILD_NUMBER + 1))
- name: Build ipa for distribution
script: |
xcode-project build-ipa \
--project "$XCODE_PROJECT" \
--scheme "$XCODE_SCHEME" \
--archive-flags "-destination 'generic/platform=iOS' -skipPackagePluginValidation"
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
publishing:
<<: *email
app_store_connect:
auth: integration
submit_to_testflight: true
beta_groups:
- Testers
submit_to_app_store: false