Enhance build workflow by adding DEVELOPMENT_TEAM to code signing opt… #14
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: Build and Archive SwiftUI App | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '16.2.0' | |
- name: Resolve Swift Packages | |
run: xcodebuild -resolvePackageDependencies -project PakePlus.xcodeproj -scheme PakePlus | |
- name: Build and archive | |
run: | | |
xcodebuild clean archive \ | |
-project PakePlus.xcodeproj \ | |
-scheme PakePlus \ | |
-configuration Release \ | |
-sdk iphoneos \ | |
-archivePath ${{ github.workspace }}/build/PakePlus.xcarchive \ | |
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO \ | |
PROVISIONING_PROFILE_SPECIFIER="" DEVELOPMENT_TEAM="" | |
- name: Create ExportOptions.plist | |
run: | | |
cat > ExportOptions.plist <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>method</key> | |
<string>debugging</string> | |
<key>signingStyle</key> | |
<string>manual</string> | |
<key>compileBitcode</key> | |
<false/> | |
<key>destination</key> | |
<string>export</string> | |
<key>stripSwiftSymbols</key> | |
<true/> | |
</dict> | |
</plist> | |
EOF | |
- name: Export IPA | |
run: | | |
ls -l ExportOptions.plist | |
cat ExportOptions.plist | |
xcodebuild -exportArchive \ | |
-archivePath ${{ github.workspace }}/build/PakePlus.xcarchive \ | |
-exportOptionsPlist ExportOptions.plist \ | |
-exportPath ${{ github.workspace }}/build | |
- name: Upload IPA to GitHub Releases | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ github.workspace }}/build/PakePlus.ipa | |
asset_name: PakePlus.ipa | |
asset_content_type: application/octet-stream | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |