Skip to content

Merge pull request #14 from shilokuma-inc/chore/compliance #6

Merge pull request #14 from shilokuma-inc/chore/compliance

Merge pull request #14 from shilokuma-inc/chore/compliance #6

Workflow file for this run

name: IOSTemplateApp
on:
push:
branches: main
jobs:
build:
name: Release | main
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
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: |
xcodebuild archive -project IOSTemplateApp.xcodeproj \
-scheme IOSTemplateApp \
-sdk iphoneos \
-configuration Release \
-archivePath IOSTemplateApp.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 IOSTemplateApp.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 }}
- name: Upload IPA file to App Store Connect
run: |
xcrun altool --upload-app -f app.ipa/IOSTemplateApp.ipa \
-u ${{ secrets.APPLE_ID }} \
-p ${{ secrets.APP_SPECIFIC_PASSWORD }} \
--type ios
- name: Upload IPA file to GitHub
uses: actions/upload-artifact@v3
with:
name: IOSTemplateApp.ipa
path: app.ipa/IOSTemplateApp.ipa