-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodemagic.yaml
56 lines (54 loc) · 1.47 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
workflows:
build:
name: iOS Build & Test
max_build_duration: 15
instance_type: mac_mini_m1
environment:
groups:
- GitHub
triggering:
events:
- push
- pull_request
- tag
branch_patterns:
- pattern: "*"
include: true
source: true
scripts:
- name: Test
script: |
#!/bin/sh
set -ex
xcode-project run-tests \
--project "Stats.xcodeproj" \
--scheme "Stats" \
--test-xcargs "CODE_SIGNING_ALLOWED=NO"
test_report: build/ios/test/*.xml
- name: Build
script: |
xcodebuild build \
-project "Stats.xcodeproj" \
-scheme "Stats" \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Extract .ipa (unsigned)
script: |
mkdir Payload
cp -r $HOME/Library/Developer/Xcode/DerivedData/**/Build/Products/Debug-iphoneos/*.app Payload
zip -r build.ipa Payload
rm -rf Payload
- name: Publish to GitHub
script: |
#!/usr/bin/env zsh
# Publish only for tag builds
if [ -z ${CM_TAG} ]; then
echo "Not a tag build, will not publish GitHub release"
exit 0
fi
gh release create "${CM_TAG}" \
--title "Stats ${CM_TAG}" \
build.ipa
artifacts:
- build.ipa