Skip to content

Commit 5d8c912

Browse files
committed
Add an iOS CI build
1 parent 65b0e95 commit 5d8c912

13 files changed

+87
-3
lines changed

.github/workflows/main.yml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,65 @@ on:
55
types: [ created ]
66

77
jobs:
8+
ios:
9+
runs-on: macOS-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 1
14+
- name: Import signing keys
15+
run: |
16+
security create-keychain -p password build.keychain
17+
security default-keychain -s ~/Library/Keychains/build.keychain
18+
19+
base64 -D <<< "${{ secrets.CERT_APPLE_DISTRIBUTION }}" > Apple_Distribution_Z52EFCPL6D.p7b
20+
security import ./Apple_Distribution_Z52EFCPL6D.p7b -k ~/Library/Keychains/build.keychain -T /usr/bin/codesign
21+
22+
base64 -D <<< "${{ secrets.CERT_APPLE_DEVELOPMENT }}" > Apple_Development_N952V7G2F5.p7b
23+
security import ./Apple_Development_N952V7G2F5.p7b -k ~/Library/Keychains/build.keychain -T /usr/bin/codesign
24+
25+
base64 -D <<< "${{ secrets.CERT_APPLE_DISTRIBUTION_P12 }}" > Apple_Distribution_Z52EFCPL6D.p12
26+
security import ./Apple_Distribution_Z52EFCPL6D.p12 -k ~/Library/Keychains/build.keychain -P heslo -T /usr/bin/codesign
27+
28+
base64 -D <<< "${{ secrets.CERT_APPLE_DEVELOPMENT_P12 }}" > Apple_Development_N952V7G2F5.p12
29+
security import ./Apple_Development_N952V7G2F5.p12 -k ~/Library/Keychains/build.keychain -P heslo -T /usr/bin/codesign
30+
31+
base64 -D <<< "${{ secrets.CERT_DEVELOPER_ID_APPLICATION }}" > Developer_ID_Application_Z52EFCPL6D.p7b
32+
security import ./Developer_ID_Application_Z52EFCPL6D.p7b -k ~/Library/Keychains/build.keychain -P heslo -T /usr/bin/codesign
33+
34+
# Unlock
35+
security unlock-keychain -p password ~/Library/Keychains/build.keychain
36+
security set-keychain-settings -lu
37+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k password ~/Library/Keychains/build.keychain
38+
39+
- name: Import provisioning profile
40+
run: |
41+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
42+
cp dist/ios/*.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
43+
- name: Cache Qt
44+
id: cache-qt
45+
uses: actions/cache@v1
46+
with:
47+
path: ../Qt
48+
key: QtCache-5.15.1
49+
- name: Install Qt
50+
uses: jurplel/install-qt-action@v2
51+
with:
52+
version: 5.15.1
53+
cached: ${{ steps.cache-qt.outputs.cache-hit }}
54+
target: ios
55+
- name: Build the iOS binary and upload it to Testflight
56+
env:
57+
APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }}
58+
APPLEID_NAME: ${{ secrets.APPLEID_NAME }}
59+
run: |
60+
export TAG_NAME=$(./dist/get-tag-name.sh)
61+
bash ./dist/ios/build.sh
62+
863
android:
964
runs-on: ubuntu-20.04
1065
steps:
11-
- uses: actions/checkout@v1
66+
- uses: actions/checkout@v2
1267
with:
1368
fetch-depth: 1
1469
- name: Cache Qt

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
build
33
android_openssl
44
build_android
5+
build_ios

Info.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
1111
<key>CFBundleName</key>
1212
<string>${PRODUCT_NAME}</string>
13+
<key>CFBundleVersion</key>
14+
<string>${QMAKE_FULL_VERSION}</string>
1315
<key>CFBundlePackageType</key>
1416
<string>APPL</string>
1517
<key>CFBundleShortVersionString</key>
1618
<string>${QMAKE_SHORT_VERSION}</string>
1719
<key>CFBundleSignature</key>
1820
<string>${QMAKE_PKGINFO_TYPEINFO}</string>
1921
<key>CFBundleVersion</key>
20-
<string>$(CURRENT_PROJECT_VERSION)</string>
22+
<string>${QMAKE_FULL_VERSION}</string>
2123
<key>LSRequiresIPhoneOS</key>
2224
<true/>
2325
<key>MinimumOSVersion</key>

dist/get-tag-name.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
PROBABLY_TAG=${GITHUB_REF/refs\/tags\//}
33

4-
TAG=$(grep "^[0-9][0-9]*[.][0-9][0-9]*-[0-9][0-9]*$" <<< "$PROBABLY_TAG")
4+
TAG=$(grep "^[0-9][0-9]*[.][0-9][0-9]*[.][0-9][0-9]*$" <<< "$PROBABLY_TAG")
55

66
# Default tag
77
#if [ -z "$TAG" ]; then
9.13 KB
Binary file not shown.
7.48 KB
Binary file not shown.
18.8 KB
Binary file not shown.
17.2 KB
Binary file not shown.

dist/ios/Lith.mobileprovision

17.2 KB
Binary file not shown.
7.48 KB
Binary file not shown.

0 commit comments

Comments
 (0)