Last active
March 21, 2025 13:33
-
-
Save AndrewDongminYoo/7ed6877fe5c7b945dd136eb9428fd036 to your computer and use it in GitHub Desktop.
iOS용 Fastfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| File: ios/fastlane/Fastfile | |
| # This file contains the fastlane.tools configuration | |
| # You can find the documentation at https://docs.fastlane.tools | |
| # | |
| # For a list of all available actions, check out | |
| # | |
| # https://docs.fastlane.tools/actions | |
| # | |
| # For a list of all available plugins, check out | |
| # | |
| # https://docs.fastlane.tools/plugins/available-plugins | |
| # | |
| # Uncomment the line if you want fastlane to automatically update itself | |
| # update_fastlane | |
| default_platform(:ios) | |
| platform :ios do | |
| desc "Build and deploy Flutter app to TestFlight" | |
| lane :release do |options| | |
| # 현재 시간을 기반으로 빌드 넘버 생성 | |
| build_number = Time.now.strftime('%y%m%d%H') | |
| # Flutter로 IPA 빌드 | |
| sh "flutter build ipa --flavor production --release --tree-shake-icons --build-number #{options[:build_number] || build_number}" | |
| # 마지막 Git Tag 가져오기 (없으면 "origin/main"으로 대체) | |
| last_tag = last_git_tag | |
| last_tag = "origin/main" if last_tag.nil? || last_tag.to_s.empty? | |
| # 마지막 태그부터 HEAD까지의 커밋 메시지를 CHANGELOG 형식으로 생성 (짧은 포맷) | |
| changelog = changelog_from_git_commits( | |
| between: [last_tag, "HEAD"], | |
| pretty: "- %s" | |
| ) | |
| # pilot 액션에 ipa 경로를 전달하여 TestFlight 업로드 실행 | |
| # 앱 별 비밀번호를 반드시 환경변수로 설정해야 함 (https://appleid.apple.com/ -> 로그인 및 보안 -> 앱 암호에서 앱 별 비밀번호 생성) | |
| # FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD="abcd-abcd-abcd-abcd" | |
| upload_to_testflight( | |
| ipa: "../build/ios/ipa/APP.ipa", # 실제 앱 ID에 따라 다릅니다. | |
| changelog: changelog # 생성된 changelog 사용 | |
| ) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment