Update Bundle Resources (1/11) #57
This file contains 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 starter workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
name: Build and Test default scheme using any available iPhone simulator | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Xcode Version | |
run: sudo xcode-select -s /Applications/Xcode_15.0.app | |
- name: Get App Store Connect API Key File | |
env: | |
ASCAPI_KEY: ${{ secrets.ASCAPI_KEY }} | |
run: | | |
KEY_PATH=$RUNNER_TEMP/ascapi-key.p8 | |
echo -n "$ASCAPI_KEY" > $KEY_PATH | |
- name: Resolve Swift dependencies | |
run: xcodebuild -resolvePackageDependencies -scheme BAGen -configuration Debug | |
- name: Archive SwiftArchive App | |
env: | |
ASCAPI_KEY_ID: ${{ secrets.ASCAPI_KEY_ID }} | |
ASCAPI_ISSUER_ID: ${{ secrets.ASCAPI_ISSUER_ID }} | |
run: | | |
KEY_PATH=$RUNNER_TEMP/ascapi-key.p8 | |
xcodebuild -scheme BAGen -configuration Debug DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath BAGen_Debug.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development" -allowProvisioningUpdates -authenticationKeyPath $KEY_PATH -authenticationKeyID $ASCAPI_KEY_ID -authenticationKeyIssuerID $ASCAPI_ISSUER_ID | |
xcodebuild -scheme BAGen -configuration Release DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath BAGen_Release.xcarchive clean archive CODE_SIGN_IDENTITY="Apple Development" -allowProvisioningUpdates -authenticationKeyPath $KEY_PATH -authenticationKeyID $ASCAPI_KEY_ID -authenticationKeyIssuerID $ASCAPI_ISSUER_ID | |
- name: Export IPA | |
run: | | |
mkdir ./Export_Debug | |
mkdir ./Export_Release | |
xcodebuild -exportArchive -archivePath BAGen_Debug.xcarchive -exportPath ./Export_Debug -exportOptionsPlist ExportOptions.plist | |
xcodebuild -exportArchive -archivePath BAGen_Release.xcarchive -exportPath ./Export_Release -exportOptionsPlist ExportOptions.plist | |
- name: Upload Debug IPA | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Debug.ipa | |
path: ./Export_Debug/BAGen.ipa | |
- name: Upload Release IPA | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Release.ipa | |
path: ./Export_Release/BAGen.ipa |