-
Notifications
You must be signed in to change notification settings - Fork 41
86 lines (75 loc) · 2.62 KB
/
Copy pathbuild-ios-app.yml
File metadata and controls
86 lines (75 loc) · 2.62 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: build-ios-app
run-name: Build for iOS
on:
push:
branches:
- "**"
concurrency:
group: ${{ github.ref }}-ios
cancel-in-progress: true
jobs:
build_ios:
runs-on: macos-26
timeout-minutes: 30
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "~26.4.0"
- name: Import Code Signing Certificates
if: github.ref == 'refs/heads/prod'
uses: Apple-Actions/import-codesign-certs@v7
with:
p12-file-base64: ${{ secrets.APPSTORE_CERTIFICATES_FILE_BASE64 }}
p12-password: ${{ secrets.APPSTORE_CERTIFICATES_PASSWORD }}
- name: Download Provisioning Profiles
if: github.ref == 'refs/heads/prod'
uses: Apple-Actions/download-provisioning-profiles@v6
with:
bundle-id: "codes.orj.Example-iOS"
issuer-id: ${{ vars.APPSTORE_ISSUER_ID }}
api-key-id: ${{ vars.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
- name: Build
if: github.ref != 'refs/heads/prod'
uses: Apple-Actions/xcodebuild@v1
with:
workspace: Example-iOS.xcworkspace
scheme: Example-iOS
sdk: iphonesimulator
build-number: ${{ github.run_number }}
zip-result-bundle: true
- name: Build Signed
if: github.ref == 'refs/heads/prod'
uses: Apple-Actions/xcodebuild@v1
with:
workspace: Example-iOS.xcworkspace
scheme: Example-iOS
sdk: iphoneos
action: archive
archive-path: .build/Archives/Example-iOS.xcarchive
export-options-plist: Support/ExportOptions.plist
build-number: ${{ github.run_number }}
zip-result-bundle: true
zip-archive: true
- name: Upload Logs
uses: actions/upload-artifact@v7
if: ${{ failure() || cancelled() }}
with:
name: logs
include-hidden-files: true
path: .build/*.log
if-no-files-found: error
- name: Upload TestFlight Build
if: github.ref == 'refs/heads/prod'
uses: Apple-Actions/upload-testflight-build@v5
env:
CURRENT_PROJECT_VERSION: ${{ github.run_number }}
PRODUCT_BUNDLE_IDENTIFIER: "codes.orj.Example-iOS"
with:
app-path: ".build/Artifacts/Example-iOS.ipa/Example-iOS.ipa"
issuer-id: ${{ vars.APPSTORE_ISSUER_ID }}
api-key-id: ${{ vars.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}