Skip to content
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
63 changes: 63 additions & 0 deletions .github/workflows/ios-cd-live.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: iOS CD (Live -> App Store)

on:
push:
branches: ["env/live"]

jobs:
deploy-appstore:
runs-on: macos-15

environment: AppStore-Deploy

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "latest-stable"

- name: Install iOS SDK (Retry up to 3 times)
run: |
for i in {1..3}; do
echo "Attempt $i to download iOS platform..."
sudo xcodebuild -downloadPlatform iOS && break || {
if [ $i -lt 3 ]; then
echo "Attempt $i failed. Retrying in 10 seconds..."
sleep 10
else
echo "All 3 attempts failed. Moving on (continue-on-error is set)."
exit 1
fi
}
done

- name: Create Real Configs
run: |
echo "${{ secrets.LIVE_CONFIG_CONTENT }}" | base64 --decode > "LiveConfig.xcconfig"
echo "${{ secrets.DEV_CONFIG_CONTENT }}" | base64 --decode > "DevConfig.xcconfig"
echo "${{ secrets.STAGE_CONFIG_CONTENT }}" | base64 --decode > "StageConfig.xcconfig"
echo "${{ secrets.BASE_CONFIG_CONTENT }}" | base64 --decode > "BaseConfig.xcconfig"

- name: Install Fastlane
run: bundle install

- name: Build and Upload to App Store
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_TOKEN }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.ASC_KEY_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.ASC_KEY_CONTENT }}
GYM_SCHEME: "Atcha-Live"
GYM_CONFIGURATION: "Release"
GYM_EXPORT_METHOD: "app-store"
GYM_XC_ARGS: "PROVISIONING_PROFILE_SPECIFIER='match AppStore com.atcha.iOS' CODE_SIGN_STYLE=Manual"
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 120

run: bundle exec fastlane release
2 changes: 2 additions & 0 deletions Atcha-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@
<string>$(AMPLITUDE_API_KEY)</string>
<key>API_BASE_URL</key>
<string>$(API_BASE_URL)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
</plist>
8 changes: 8 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ platform :ios do

desc "App Store 업로드 (Submit은 안 함)"
lane :release do

api_key = app_store_connect_api_key(
key_id: ENV["ASC_KEY_ID"],
issuer_id: ENV["ASC_ISSUER_ID"],
key_content: ENV["ASC_KEY_CONTENT"],
is_key_content_base64: true
)

match(type: "appstore")

latest_build = latest_testflight_build_number(api_key: api_key)
Expand Down