-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (52 loc) · 2.18 KB
/
Copy pathobjective-c-xcode.yml
File metadata and controls
66 lines (52 loc) · 2.18 KB
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
name: Xcode - Build and Analyze
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and analyse default scheme using xcodebuild command
runs-on: macos-latest
environment: build-and-sign
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Formatting
run: |
brew install clang-format
Scripts/format.sh --check
- name: Prepare Keychain For Signing
env:
SECRET_MACOS_CERTIFICATE_B64: ${{ secrets.MACOS_CERTIFICATE }}
SECRET_MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
SECRET_KEYCHAIN_PWD: ${{ secrets.KEYCHAIN_PWD }}
run: |
# Set up path for certificate file
CERTIFICATE_PATH=$RUNNER_TEMP/signing_certificate.p12
echo Using signing certificate at: $CERTIFICATE_PATH
# Decode base64 certificate secret into .p12 file
echo -n "$SECRET_MACOS_CERTIFICATE_B64" | base64 --decode --output $CERTIFICATE_PATH
# Set up path for keychain database
KEYCHAIN_PATH=$RUNNER_TEMP/signing_keychain.keychain-db
echo Using signing keychain at: $KEYCHAIN_PATH
# Create and configure keychain database
security create-keychain -p "$SECRET_KEYCHAIN_PWD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
# Unlock keychain before build process
security unlock-keychain -p "$SECRET_KEYCHAIN_PWD" $KEYCHAIN_PATH
# Import the signing certificate into keychain database
security import $CERTIFICATE_PATH -P "$SECRET_MACOS_CERTIFICATE_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Download Dependencies
run: |
Scripts/stage_dependencies.py --skip-prompt --download
- name: Carthage Dependencies
run: |
carthage bootstrap --use-xcframeworks --platform mac
- name: Build
run: |
xcodebuild build -scheme CoreZen -project CoreZen.xcodeproj
- name: Analyze
run: |
xcodebuild analyze -scheme CoreZen -project CoreZen.xcodeproj