Skip to content

Conversation

@cirtuare
Copy link
Contributor

@cirtuare cirtuare commented Apr 16, 2025

🐿️ Pull Requests

🪵 작업 브랜치

🥔 작업 내용

Fastlane CICD를 적용했습니다.

  • 인증서 관리 (Development, Appstore, AdHoc)
  • Fastlane & Github Actions CICD
  • 슬랙에 CICD 결과 연동

Fastlane 인증서 관리

  1. Ruby 설치와 Github SSH key가 설정되어있는지 확인
  2. ./acon-ios 디렉토리에서 다음과 명령 실행
gem install bundler
bundle install
bundle exec fastlane match development --readonly
bundle exec fastlane match appstore --readonly
bundle exec fastlane match adhoc --readonly

인증서 파일은 Private 레포에서 관리 중입니다.
자세한 실행 방법은 보내드린 노션을 참고해주세요!

Fastlane CD

실행 방법

bundle exec fastlane {lane명}

Lane

  • register_device : Apple Devloper Devices 정보
  • dev : 데브 빌드 - ipa 파일 생성
  • beta : 테스트플라이트 배포
  • release: 앱스토어 배포

버전 업데이트: 뒤에 version_number:{version}을 붙여주세요 !

ex) bundle exec fastlane beta version_number:1.0.2
뒤에 version_number:{version}를 안 붙이면 빌드 번호만 올라갑니다.
버전 업데이트가 꼭 필요한 경우가 아니면 사용하지 말아주세요!

슬랙 배포 결과 전달

after_all do |lane|
  slack(
    message: "App successfully deployed from lane: #{lane}. Version: #{get_version_number}, Build: #{get_build_number}",
    success: true,
    slack_url: ENV["SLACK_WEBHOOK_URL"]
  )
end

error do |lane, exception|
  slack(
    message: "Error deploying from lane: #{lane}, error: #{exception}",
    success: false,
    slack_url: ENV["SLACK_WEBHOOK_URL"]
  )
end

🚨 참고 사항

결국 Github Actions 도입 안 하고 Fastlane만 사용했습니다 !!

GitHub Actions 도입 이유

처음에 Fastlane만으로 CICD를 적용하려 했으나, 실행에 필요한 key들을 담은 env 파일을 따로 관리하는 것이 비효율적으로 느껴졌습니다.
따라서 env 정보들을 Github Secrets으로 관리하고, Github Actions에서 Fastlane lane을 실행하는 방식으로 적용하려 하였습니다. TestFlight Deploy라는 action을 만들어, bundle exec fastlane beta를 실행하고 있습니다.

GitHub Actions 배포 자동화 오류

현재 Github의 macOS-14, macOS-15 러너가 모두 Xcode 16.2 버전을 읽지 못하고, 각 러너의 디폴트 Xcode 버전으로 읽어 배포 오류를 겪고 있습니다. 이에 따라 Xcode 16.2 버전을 macOS-15의 디폴트 버전인 16.0으로 내리든, GitHub Actions 사용 없이 Fastlane 단독으로 CICD 관리를 할 지 고민 중입니다...!
이건 해결했습니다 !

오류 계속 해결 중이고, 현재는 xcconfig 관련 에러가 있습니다.. ㅠㅠ
다만 배포 자동화 자체가 급한 건 아니라, 다음 배포 전에 다시 다뤄봐도 좋을 것 같습니다.

📸 스크린샷

💥 To be sure

  • 모든 뷰가 잘 실행되는지 다시 한 번 체크해주세요 !

🌰 Resolve issue

@cirtuare cirtuare self-assigned this Apr 16, 2025
Copy link
Collaborator

@yurim830 yurim830 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!!

@cirtuare cirtuare changed the title [SETTING] Fastlane & GitHub Actions CICD 적용 (#109) [SETTING] Fastlane CICD 적용 (#109) Apr 16, 2025
@cirtuare cirtuare merged commit 1e0165f into develop Apr 16, 2025
@cirtuare cirtuare deleted the setting/#109 branch August 12, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SETTING] Fastlane CICD 적용

3 participants