Skip to content

Commit

Permalink
Merge pull request #13 from shilokuma-inc/chore/archive_flow
Browse files Browse the repository at this point in the history
【CHORE】Archiveのworkflow作成
  • Loading branch information
mrs1669 committed May 9, 2024
2 parents 9d3eaae + 6e5d656 commit a1f3e4b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Build (commit)
name: PrimePickApp

on:
push:
branches:
- '*'
- '**'
- '!main'

jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
name: Build | working branch
runs-on: macos-latest

steps:
- 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: Build
env:
scheme: ${{ 'default' }}
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/2-archive-working_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: PrimePickApp

on:
push:
branches:
- '**'
- '!main'

jobs:
build:
name: Archive | working branch
runs-on: macos-latest

steps:
- 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 PrimePickApp.xcodeproj \
-scheme PrimePickApp \
-sdk iphoneos \
-configuration Release \
-archivePath PrimePickApp.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 PrimePickApp.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 }}
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ jobs:
steps:
- 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: Build
env:
scheme: ${{ 'default' }}
Expand Down

0 comments on commit a1f3e4b

Please sign in to comment.