Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【FEAT】App Store へのアップロードワークフロー作成 #17

Merged
merged 6 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

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

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

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

steps:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/3-release-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: PrimePickApp

on:
push:
branches: main

jobs:
build:
name: Release | main
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 }}

- name: Upload IPA to App Store Connect
run: |
xcrun altool --upload-app -f app.ipa/PrimePickApp.ipa \
-u ${{ secrets.APPLE_ID }} \
-p ${{ secrets.APP_SPECIFIC_PASSWORD }} \
--type ios
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"images" : [
{
"filename" : "AppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down