forked from ukhsa-collaboration/COVID-19-app-iOS-BETA
-
Notifications
You must be signed in to change notification settings - Fork 19
77 lines (65 loc) · 2.25 KB
/
ci.yml
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
name: ci
on:
push:
branches-ignore:
- ci
jobs:
build:
runs-on:
- macos-10.15
strategy:
matrix:
run-config:
- { sdk: "iphoneos" }
- { sdk: "iphonesimulator" }
steps:
- name: Checkout Project
uses: actions/checkout@01aeccc # v2.1.0
- name: Switch to Xcode 11
run: sudo xcode-select -s /Applications/Xcode_11.app
- name: Show Build Version
run: xcodebuild -version
- name: Show Build Settings
run: xcodebuild -showBuildSettings
- name: Show Build SDK
run: xcodebuild -showsdks
- name: Setup Build Configuration
env:
GOOGLE_SERVICE_INFO_PLIST_INTERNAL: ${{ secrets.google_service_info_plist_internal }}
run: |
cp Sonar/Environments/Sonar.xcconfig.sample .secret/Sonar.xcconfig
echo $GOOGLE_SERVICE_INFO_PLIST_INTERNAL > .secret/GoogleService-Info.plist
cat Sonar/Environments/environment.json | ./bin/make-environment > .secret/Environment.swift
- name: Run Build
env:
SDK: ${{ matrix.run-config['sdk'] }}
run: |
xcodebuild -scheme Sonar -configuration release -sdk ${SDK} CODE_SIGNING_ALLOWED=NO
xcodebuild -scheme Sonar -sdk ${SDK} build-for-testing CODE_SIGNING_ALLOWED=NO
merge-to-internal:
needs: build
runs-on:
- macos-10.15
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout Project
uses: actions/checkout@01aeccc # v2.1.0
with:
fetch-depth: 0
persist-credentials: false
# Since this workflow needs to trigger the ci workflow,
# we can't use the built-in GITHUB_TOKEN, so we need to
# set a remote url that uses a personal access token.
- name: Set origin
env:
GITHUB_TOKEN: ${{ secrets.deployment_token }}
run: git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: Merge and push to internal branch
env:
GIT_AUTHOR_NAME: GitHub Actions
GIT_AUTHOR_EMAIL: [email protected]
run: |
git fetch origin internal
git checkout internal
git merge master
git push origin internal