Merge pull request #93 from shilokuma-inc/fix/Score #55
Workflow file for this run
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: Archive | |
on: | |
push: | |
branches: | |
- '**' | |
- '!main' | |
- '!develop' | |
jobs: | |
build: | |
name: working | |
runs-on: macos-latest | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: ci_post_clone | |
run: | | |
defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES | |
- name: Set Default Scheme | |
run: | | |
scheme_list=$(xcodebuild -list -json | tr -d "\n") | |
echo "$scheme_list" | |
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") | |
echo $default | cat >default | |
echo Using default scheme: $default | |
- name: Archive Project | |
run: | | |
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi | |
scheme_list=$(xcodebuild -list -json | tr -d "\n") | |
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") | |
xcodebuild archive -"$filetype_parameter" "$file_to_build" \ | |
-scheme $default \ | |
-sdk iphoneos \ | |
-configuration Release \ | |
-archivePath build.xcarchive \ | |
CODE_SIGNING_ALLOWED=NO | |
- name: Create ExportOptions.plist | |
run: | | |
echo '${{ secrets.EXPORT_OPTIONS }}' > ExportOptions.plist | |
- name: Create Private Key | |
run: | | |
mkdir private_keys | |
echo -n '${{ secrets.APPLE_API_KEY_BASE64 }}' | base64 --decode > ./private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 | |
- name: Export IPA | |
run: | | |
xcodebuild -exportArchive \ | |
-archivePath build.xcarchive \ | |
-exportOptionsPlist ExportOptions.plist \ | |
-exportPath app.ipa \ | |
-allowProvisioningUpdates \ | |
-authenticationKeyPath `pwd`/private_keys/AuthKey_${{ secrets.APPLE_API_ISSUER_ID }}.p8 \ | |
-authenticationKeyID ${{ secrets.APPLE_API_KEY_ID }} \ | |
-authenticationKeyIssuerID ${{ secrets.APPLE_API_ISSUER_ID }} |