-
Notifications
You must be signed in to change notification settings - Fork 0
Setting/#485 Github Action와 Fastlane을 통한 자동 배포 #486
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
The head ref may contain hidden characters: "setting/#485-\uC790\uB3D9\uBC30\uD3EC"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Fastlane CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
| types: [closed] | ||
|
|
||
| jobs: | ||
| fastlane: | ||
| name: Run Fastlane | ||
| runs-on: macos-latest | ||
| if: github.event.pull_request.merged == true | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# v3 액션 런타임을 확인합니다.
curl -fsSL https://raw.githubusercontent.com/actions/checkout/v3/action.yml |
rg -n 'using:|node'Repository: 36-APPJAM-HEARTZ/BYEBOO-iOS Length of output: 185 🌐 Web query:
💡 Result: GitHub Actions support for Node 16 reached its end-of-life (EOL) and has been fully removed from the Actions runner environment [1]. The deprecation timeline and key points are as follows: 1. End of Life Date: Node 16 was officially removed from the GitHub Actions runner environment on November 12, 2024 [1]. 2. Context for actions/checkout: While Citations:
🧰 Tools🪛 actionlint (1.7.12)[error] 18-18: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Setup Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: 3.1 | ||
|
|
||
| - name: Install Bundler | ||
| run: gem install bundler | ||
|
|
||
| - name: Install dependencies | ||
| run: bundle install | ||
|
|
||
| - name: Output Fastlane environment | ||
| run: bundle exec fastlane env | ||
|
Comment on lines
+30
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Fastlane과 Bundler 설정 파일의 실제 위치를 확인합니다.
fd -H -t f '^(Gemfile|Fastfile)$' .Repository: 36-APPJAM-HEARTZ/BYEBOO-iOS Length of output: 217 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf 'Workflow file:\n'
sed -n '1,140p' .github/workflows/fastlane_ci.yml
printf '\nRoot listing relevant entries:\n'
git ls-files | sed -n '1,200p' | grep -E '(^|/)(Gemfile|Fastfile|\.fastlane|bundle|fastlane|README|\.github/workflows/fastlane_ci.yml)$' || trueRepository: 36-APPJAM-HEARTZ/BYEBOO-iOS Length of output: 2556
저장소 루트에는 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Run upload_testflight | ||
| if: github.event.pull_request.base.ref == 'develop' | ||
| env: | ||
| APPLE_ID: ${{ secrets.APPLE_ID }} | ||
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
| FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
| FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} | ||
| APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER }} | ||
| FASTLANE_ITC_TEAM_ID: ${{ secrets.FASTLANE_ITC_TEAM_ID }} | ||
| TEAM_ID: ${{ secrets.TEAM_ID }} | ||
| PRIVATE_REPOSITORY: ${{ secrets.PRIVATE_REPOSITORY }} | ||
| MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | ||
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
| DISCORD_URL: ${{ secrets.DISCORD_URL }} | ||
| run: bundle exec fastlane upload_testflight | ||
|
|
||
| - name: Run release_app_store on main | ||
| if: github.event.pull_request.base.ref == 'main' | ||
| env: | ||
| APPLE_ID: ${{ secrets.APPLE_ID }} | ||
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
| FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
| FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} | ||
| APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER }} | ||
| FASTLANE_ITC_TEAM_ID: ${{ secrets.FASTLANE_ITC_TEAM_ID }} | ||
| TEAM_ID: ${{ secrets.TEAM_ID }} | ||
| PRIVATE_REPOSITORY: ${{ secrets.PRIVATE_REPOSITORY }} | ||
| MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | ||
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
| DISCORD_URL: ${{ secrets.DISCORD_URL }} | ||
| run: bundle exec fastlane release_app_store | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,15 +18,103 @@ default_platform(:ios) | |||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"] = "10" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| XCODEPROJ = "ByeBoo-iOS.xcodeproj" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| SCHEME = "ByeBoo-iOS" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| platform :ios do | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| def notify_discord_success(lane_name) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| sh( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "curl -H 'Content-Type: application/json' " + | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "-d '{\"content\": \"💟🍎 **#{lane_name}** 성공! 🎉\"}' " + | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "#{ENV['DISCORD_URL']}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| def notify_discord_failure(lane_name, error_message) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| sh( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "curl -H 'Content-Type: application/json' " + | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "-d '{\"content\": \"🤔🌀 **#{lane_name}** 실패\\n```#{error_message.to_s.gsub('"', "'").gsub("\n", " ")}```\"}' " + | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| "#{ENV['DISCORD_URL']}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+34
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== file excerpt =="
sed -n '1,120p' ByeBoo-iOS/fastlane/Fastfile
echo
echo "== relevant notify_discord_* usages =="
rg -n "notify_discord|DISCORD_URL|upload_testflight|release_app_store" ByeBoo-iOS/fastlane/Fastfile
echo
echo "== fastlane/Gemfile versions =="
for f in ByeBoo-iOS/Gemfile ByeBoo-iOS/fastlane/Gemfile Gemfile ByeBoo-iOS/fastlane/Gemfile; do
if [ -f "$f" ]; then
echo "--- $f"
rg -n "fastlane|ruby" "$f" || true
fi
done
echo
echo "== local shell command construction behavior probe =="
python3 - <<'PY'
import shlex
msg = "abc' && curl -e \"injected\" # comment"
cmd = "curl -H 'Content-Type: application/json' -d '{\"content\": \"🤔🌀 **lane_name** 실패\\n```" + msg + "```\"}' DISCORD_URL"
print("constructed:")
print(cmd)
print("parsed by shlex:")
try:
for i, token in enumerate(shlex.split(cmd, posix=True), 1):
print(f"{i}: {token!r}")
except Exception as e:
print(f"shlex error: {type(e).__name__}: {e}")
PYRepository: 36-APPJAM-HEARTZ/BYEBOO-iOS Length of output: 3967 🌐 Web query:
💡 Result: To securely pass arguments to the Fastlane Citations:
oler_? ? 오류 메시지를 쉘 명령어에서 안전한 인수로 전달하십시오.
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| def prepare_ci_and_signing | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| setup_ci | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| match(type: "appstore") | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| update_project_team( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: XCODEPROJ, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| teamid: ENV['TEAM_ID'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| def next_build_number | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| latest_build = latest_testflight_build_number( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| app_identifier: ENV['APP_IDENTIFIER'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| initial_build_number: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| latest_build + 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc "Push a new beta build to TestFlight" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| lane :upload_testflight do | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| increment_build_number(xcodeproj: "ByeBoo-iOS.xcodeproj") | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| match(type: "appstore") | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_app( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| scheme: "ByeBoo-iOS", | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| export_method: "app-store" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| upload_to_testflight | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| begin | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| iprepare_ci_and_signing | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win 정의된 헬퍼 이름을 호출하십시오.
수정 예시- iprepare_ci_and_signing
+ prepare_ci_and_signing📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_number = next_build_number | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| increment_build_number( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| xcodeproj: XCODEPROJ, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_number: build_number | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_app( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| scheme: SCHEME, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| export_method: "app-store" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| upload_to_testflight( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| skip_waiting_for_build_processing: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| notify_discord_success("TestFlight 업로드", build_number) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 성공 알림 헬퍼의 인수 개수를 맞추십시오.
수정 예시- notify_discord_success("TestFlight 업로드", build_number)
+ notify_discord_success("TestFlight 업로드")📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| rescue => e | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| notify_discord_failure("TestFlight 업로드", e.message) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| raise e | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| desc "Release a new version to the App Store" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| lane :release_app_store do | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| begin | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| prepare_ci_and_signing | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_number = next_build_number | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| increment_build_number( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| xcodeproj: XCODEPROJ, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_number: build_number | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| build_app( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| scheme: SCHEME, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| export_method: "app-store" | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| upload_to_app_store( | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| skip_screenshots: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| skip_metadata: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| force: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| submit_for_review: true, # 자동으로 심사 제출 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| automatic_release: true, # 심사 통과 후 자동 출시 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| precheck_include_in_app_purchases: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| submission_information: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| add_id_info_uses_idfa: false, # admob 추가 시 true로 변경 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| export_compliance_uses_encryption: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| rescue => e | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+103
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
Line 103의 수정 예시 submission_information: {
add_id_info_uses_idfa: false,
export_compliance_uses_encryption: false
}
+ )
rescue => e📝 Committable suggestion
Suggested change
🧰 Tools🪛 RuboCop (1.88.2)[fatal] 114-114: unexpected token kRESCUE (Lint/Syntax) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| notify_discord_failure("App Store 배포", e.message) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| raise e | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+114
to
+117
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win App Store 제출 성공 알림을 추가하십시오.
🧰 Tools🪛 RuboCop (1.88.2)[fatal] 114-114: unexpected token kRESCUE (Lint/Syntax) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
배포 작업을 직렬화하거나 빌드 번호를 원자적으로 할당하십시오.
동시에 두 PR이 병합되면 두 작업이
latest_testflight_build_number를 같은 값으로 읽을 수 있습니다. 두 작업은 같은 다음 빌드 번호를 업로드하려고 시도합니다. 한 작업은 중복 빌드 번호 때문에 실패합니다.TestFlight와 App Store 레인 전체에 공유되는 배포 조정 방식을 추가하십시오. GitHub Actions
concurrency를 사용할 경우, 대기 중인 배포가 취소될 수 있는 정책도 명시적으로 처리하십시오.🤖 Prompt for AI Agents