-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 2.84 KB
/
deploy.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: Deploy
on:
push:
branches: [ main, main-tuist ]
jobs:
build-and-deploy:
runs-on: macos-14
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Install provisioning profile
run: |
gpg --quiet --batch --yes --decrypt \
--passphrase="${{ secrets.PROFILE_PASSPHRASE }}" \
--output .github/deployment/EssentialAppDistributionProfile.mobileprovision .github/deployment/EssentialAppDistributionProfile.mobileprovision.gpg
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp .github/deployment/EssentialAppDistributionProfile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
- name: Install keychain certificate
run: |
gpg --quiet --batch --yes --decrypt \
--passphrase="${{ secrets.CERTIFICATE_PASSPHRASE }}" \
--output .github/deployment/EssentialAppDistributionCertificate.p12 .github/deployment/EssentialAppDistributionCertificate.p12.gpg
security create-keychain -p "" build.keychain
security import .github/deployment/EssentialAppDistributionCertificate.p12 -t agg -k ~/Library/Keychains/build.keychain -P "${{ secrets.CERTIFICATE_PASSWORD }}" -A
security list-keychains -s ~/Library/Keychains/build.keychain
security default-keychain -s ~/Library/Keychains/build.keychain
security unlock-keychain -p "" ~/Library/Keychains/build.keychain
security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain
- name: Generate Project using tuist
run: tuist generate
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_15.4.app
- name: Xcode version
run: xcodebuild -version
- name: Bump build number
run: |
buildNumber=$(($GITHUB_RUN_NUMBER + 2))
cd EssentialApp/
agvtool new-version $buildNumber
- name: Build
run: |
xcodebuild clean archive \
-sdk iphoneos \
-workspace EssentialApp.xcworkspace \
-configuration "Release" \
-scheme "EssentialApp" \
-derivedDataPath "DerivedData" \
-archivePath "DerivedData/Archive/EssentialApp.xcarchive" | xcbeautify
- name: Export
run: |
xcodebuild \
-exportArchive \
-archivePath DerivedData/Archive/EssentialApp.xcarchive \
-exportOptionsPlist .github/deployment/ExportOptions.plist \
-exportPath DerivedData/ipa | xcbeautify
- name: Deploy
run: |
xcrun altool \
--upload-app \
--type ios \
--file "DerivedData/ipa/EssentialApp.ipa" --username "${{ secrets.APPSTORE_USERNAME }}" --password "${{ secrets.APPSTORE_PASSWORD }}"