Update GitHub Actions workflow for iOS build process #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: iOS Build (Unsigned IPA) | |
on: | |
workflow_dispatch: # 手动触发 | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Select Xcode version | |
run: sudo xcode-select -s /Applications/Xcode_16.3.app | |
- name: Build archive | |
run: | | |
xcodebuild clean archive \ | |
-project PakePlus.xcworkspace \ # 如果是.xcodeproj就改成 -project | |
-scheme PakePlus \ | |
-configuration Release \ | |
-archivePath $PWD/build/PakePlus.xcarchive \ | |
SKIP_INSTALL=NO \ | |
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | |
- name: Create ExportOptions.plist | |
run: | | |
cat > ExportOptions.plist <<EOF | |
{ | |
"compileBitcode": false, | |
"method": "ad-hoc", | |
"signingStyle": "manual", | |
"stripSwiftSymbols": true, | |
"teamID": "", | |
"thinning": "<none>" | |
} | |
EOF | |
- name: Export IPA (Unsigned) | |
run: | | |
xcodebuild -exportArchive \ | |
-archivePath $PWD/build/PakePlus.xcarchive \ | |
-exportOptionsPlist ExportOptions.plist \ | |
-exportPath $PWD/build | |
- name: Upload IPA Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PakePlus-unsigned-ipa | |
path: build/*.ipa |