-
Notifications
You must be signed in to change notification settings - Fork 0
270 lines (231 loc) · 10.2 KB
/
build-ipa.yml
File metadata and controls
270 lines (231 loc) · 10.2 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
name: Build IPA
on:
push:
branches: [ main, develop ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
build_configuration:
description: 'Build Configuration'
required: true
default: 'Release'
type: choice
options:
- Release
- Debug
env:
XCODE_VERSION: 'latest-stable'
jobs:
build:
name: Build and Archive
runs-on: macos-15
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 'latest'
- name: Select Xcode Version
run: |
# Use the latest Xcode that was just installed, but exclude helper apps
LATEST_XCODE=$(find /Applications -maxdepth 1 -name "Xcode*.app" -not -path "*/Xcode Helper.app" | sort -V | tail -1)
echo "Using Xcode: $LATEST_XCODE"
if [ -z "$LATEST_XCODE" ]; then
echo "No Xcode found, using default"
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
else
sudo xcode-select -switch "$LATEST_XCODE/Contents/Developer"
fi
- name: Show Xcode Version
run: |
xcodebuild -version
xcode-select -print-path
- name: Show Available Simulators
run: |
xcrun simctl list devices available
echo "Available iOS SDKs:"
xcodebuild -showsdks | grep iOS
- name: Download Latest iOS Platform
run: |
# Download all available iOS platforms
sudo xcodebuild -downloadAllPlatforms || true
# Show what we have after download
echo "iOS SDKs after download:"
xcodebuild -showsdks | grep iOS
- name: Cache Derived Data
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-derived-data-${{ hashFiles('**/*.swift', '**/*.m', '**/*.h') }}
restore-keys: |
${{ runner.os }}-derived-data-
- name: Get Dynamic Build Info
id: build_info
run: |
# Get the latest iOS SDK dynamically
LATEST_IOS_SDK=$(xcodebuild -showsdks | grep 'iOS' | tail -1 | awk '{print $NF}')
XCODE_VERSION=$(xcodebuild -version | head -1 | awk '{print $2}')
echo "latest_ios_sdk=${LATEST_IOS_SDK}" >> $GITHUB_OUTPUT
echo "xcode_version=${XCODE_VERSION}" >> $GITHUB_OUTPUT
echo "Latest iOS SDK: ${LATEST_IOS_SDK}"
echo "Xcode Version: ${XCODE_VERSION}"
- name: Clean Build Directory
run: |
rm -rf build/
mkdir -p build/
- name: Build Project
run: |
set -o pipefail
xcodebuild \
-project FrameExtractionTool.xcodeproj \
-scheme FrameExtractionTool \
-configuration ${{ github.event.inputs.build_configuration || 'Release' }} \
-destination "generic/platform=iOS" \
-archivePath build/FrameExtractionTool.xcarchive \
archive \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGN_IDENTITY="" \
PROVISIONING_PROFILE="" \
DEVELOPMENT_TEAM="" \
-allowProvisioningUpdates \
| tee xcodebuild.log
- name: Create Payload Directory
run: |
mkdir -p build/Payload
if [ -d "build/FrameExtractionTool.xcarchive/Products/Applications/FrameExtractionTool.app" ]; then
cp -r build/FrameExtractionTool.xcarchive/Products/Applications/FrameExtractionTool.app build/Payload/
else
echo "Error: App not found in archive"
find build/ -name "*.app" -type d
exit 1
fi
- name: Generate IPA
run: |
cd build
zip -r FrameExtractionTool-unsigned.ipa Payload/
- name: Verify IPA Structure
run: |
cd build
unzip -l FrameExtractionTool-unsigned.ipa | head -20
ls -la FrameExtractionTool-unsigned.ipa
- name: Get App Version
id: app_version
run: |
APP_VERSION=$(xcodebuild -project FrameExtractionTool.xcodeproj -showBuildSettings -configuration Release | grep -E 'MARKETING_VERSION' | awk '{print $3}' | head -1)
BUILD_NUMBER=$(xcodebuild -project FrameExtractionTool.xcodeproj -showBuildSettings -configuration Release | grep -E 'CURRENT_PROJECT_VERSION' | awk '{print $3}' | head -1)
echo "app_version=${APP_VERSION}" >> $GITHUB_OUTPUT
echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
echo "App Version: ${APP_VERSION}"
echo "Build Number: ${BUILD_NUMBER}"
- name: Upload IPA Artifact
uses: actions/upload-artifact@v4
with:
name: FrameExtractionTool-v${{ steps.app_version.outputs.app_version }}-build${{ steps.app_version.outputs.build_number }}-unsigned
path: build/FrameExtractionTool-unsigned.ipa
retention-days: 30
- name: Upload Archive Artifact
uses: actions/upload-artifact@v4
with:
name: FrameExtractionTool-archive-v${{ steps.app_version.outputs.app_version }}
path: build/FrameExtractionTool.xcarchive
retention-days: 7
- name: Generate Build Summary
run: |
echo "## 📱 iOS Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| **App Version** | ${{ steps.app_version.outputs.app_version }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Build Number** | ${{ steps.app_version.outputs.build_number }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Configuration** | ${{ github.event.inputs.build_configuration || 'Release' }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Xcode Version** | ${{ steps.build_info.outputs.xcode_version }} |" >> $GITHUB_STEP_SUMMARY
echo "| **iOS SDK** | ${{ steps.build_info.outputs.latest_ios_sdk }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Runner OS** | ${{ runner.os }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Commit** | \`${{ github.sha }}\` |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### 📦 Artifacts Generated" >> $GITHUB_STEP_SUMMARY
echo "- **Unsigned IPA**: \`FrameExtractionTool-unsigned.ipa\`" >> $GITHUB_STEP_SUMMARY
echo "- **Xcode Archive**: \`FrameExtractionTool.xcarchive\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### 🔽 Download" >> $GITHUB_STEP_SUMMARY
echo "The unsigned IPA can be downloaded from the **Artifacts** section of this workflow run." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "> ⚠️ **Note**: This is an unsigned build. For installation on physical devices, code signing is required." >> $GITHUB_STEP_SUMMARY
- name: Upload Build Logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-logs-${{ github.run_number }}
path: |
xcodebuild.log
build/
retention-days: 7
release:
name: Create Release
runs-on: macos-15
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 'latest'
- name: Get App Version
id: app_version
run: |
APP_VERSION=$(xcodebuild -project FrameExtractionTool.xcodeproj -showBuildSettings -configuration Release | grep -E 'MARKETING_VERSION' | awk '{print $3}' | head -1)
BUILD_NUMBER=$(xcodebuild -project FrameExtractionTool.xcodeproj -showBuildSettings -configuration Release | grep -E 'CURRENT_PROJECT_VERSION' | awk '{print $3}' | head -1)
# Extract version from Git tag for release title
GIT_TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "release_version=${GIT_TAG_VERSION}" >> $GITHUB_OUTPUT
echo "app_version=${APP_VERSION}" >> $GITHUB_OUTPUT
echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
echo "Git Tag Version: ${GIT_TAG_VERSION}"
echo "App Version: ${APP_VERSION}"
echo "Build Number: ${BUILD_NUMBER}"
- name: Download IPA Artifact
uses: actions/download-artifact@v4
with:
name: FrameExtractionTool-v${{ steps.app_version.outputs.app_version }}-build${{ steps.app_version.outputs.build_number }}-unsigned
path: ./release/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
./release/FrameExtractionTool-unsigned.ipa
name: FrameExtractionTool ${{ steps.app_version.outputs.release_version }}
body: |
## FrameExtractionTool ${{ steps.app_version.outputs.release_version }}
### 📱 What's New
<!-- Add release notes here -->
### 📋 Build Information
- **Version**: ${{ steps.app_version.outputs.release_version }}
- **Build**: ${{ steps.app_version.outputs.build_number }}
- **iOS Target**: 17.0+
- **Architecture**: Universal (iPhone/iPad)
### 📦 Installation
#### For Developers:
1. Download the `FrameExtractionTool-unsigned.ipa` file
2. Use Xcode or developer tools to install on your device
3. Requires valid developer certificate and provisioning profile
#### For Enterprise/Internal Distribution:
- Contact your IT administrator for installation assistance
- Enterprise certificates may be required
### ⚠️ Important Notes
- This is an **unsigned** build
- Installation requires developer tools or enterprise distribution
- For App Store distribution, use signed builds through official channels
### 🔧 Technical Details
- Built with latest Xcode and iOS SDK
- Swift 5.0 with modern concurrency
- SwiftUI + AVFoundation architecture
---
Built automatically by GitHub Actions 🤖
draft: false
prerelease: false