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
12 changes: 12 additions & 0 deletions .github/actions/setup-ios-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ runs:
echo "CI_DERIVED_DATA=$HOME/ci-derived-data/$DERIVED_DATA_DIRECTORY" >> "$GITHUB_ENV"
fi

- name: Verify Fastlane Ruby
if: inputs.include-ruby-path == 'true'
shell: bash
run: |
expected="$(cat .ruby-version)"
actual="$(ruby -e 'print RUBY_VERSION' 2>/dev/null || true)"
if [[ "$actual" != "$expected" ]]; then
echo "::error::Ruby $expected 가 필요합니다. 현재: ${actual:-없음} ($(command -v ruby || echo 'ruby 없음'))"
exit 1
fi
echo "Fastlane Ruby: $actual ($(command -v ruby))"

- name: Restore iOS build configuration
shell: bash
env:
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.9
50 changes: 50 additions & 0 deletions Scripts/deploy-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# CI(ios-deploy.yml)와 같은 순서로 로컬에서 배포한다.
# Scripts/deploy-local.sh release # App Store 업로드 후 심사 제출
# Scripts/deploy-local.sh qa # TestFlight 업로드
# 비대화형 셸에는 rbenv shim이 PATH에 없어 Homebrew Ruby가 잡힐 수 있으므로
# CI처럼 rbenv shim을 PATH 맨 앞에 두고 .ruby-version과 일치하는지 확인한다.
# 배포 자격 증명은 fastlane/.env 에서 읽는다.
set -euo pipefail

readonly lane="${1:-}"
if [[ "$lane" != "release" && "$lane" != "qa" ]]; then
echo "사용법: $0 release|qa" >&2
exit 64
fi

cd "$(dirname "$0")/.."

export PATH="$HOME/.rbenv/shims:$HOME/.local/share/mise/shims:/opt/homebrew/bin:$PATH"
expected_ruby="$(cat .ruby-version)"
actual_ruby="$(ruby -e 'print RUBY_VERSION' 2>/dev/null || true)"
if [[ "$actual_ruby" != "$expected_ruby" ]]; then
echo "Ruby $expected_ruby 가 필요합니다. 현재: ${actual_ruby:-없음} ($(command -v ruby || echo 'ruby 없음'))" >&2
exit 1
fi

if [[ ! -f fastlane/.env ]]; then
echo "fastlane/.env 가 없습니다. 배포 자격 증명을 먼저 준비해 주세요." >&2
exit 1
fi
set -a
# shellcheck disable=SC1091
source fastlane/.env
set +a
export TUIST_RELEASE_BUILD=1 LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
export FASTLANE_SKIP_UPDATE_CHECK=1 FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=600

tuist install
tuist generate --no-open --cache-profile none

if [[ "$lane" == "qa" ]]; then
RELEASE_NOTES="$(git log -1 --pretty=%s)" bundle exec fastlane ios QA
exit 0
fi

version_file="Plugins/ProjectTemplatePlugin/ProjectDescriptionHelpers/Project+Templete/Extension+String.swift"
version="$(sed -nE 's/.*appVersion\(version: String = "([0-9.]+)"\).*/\1/p' "$version_file" | head -1)"
test -n "$version" || { echo "appVersion 추출 실패: $version_file" >&2; exit 1; }

bundle exec fastlane ios release
bundle exec fastlane ios submit_for_review version:"$version"
Loading