ci: Xcode CloudのCIスクリプトをワークフロー別に分岐させる#149
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Xcode CloudへCD移行に伴い、cd_release.yml/cd_testFlight.ymlは不要になったため削除する。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger Swift against 73a646d |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
経緯
ci_post_clone.shは VRT 用のスナップショット参照ファイル確認処理が無条件に実行されていたが、Xcode Cloud で別ワークフローを走らせた際にも同じ処理が走ってしまい不適切だったcd_release.yml/cd_testFlight.yml) で行っていた以下の処理を Xcode Cloud 上でも再現する必要があったGoogleService-Info.plistを secret からデコードして配置agvtool new-version)v{version}付け実装内容
ci_post_clone.shをcase "$CI_WORKFLOW"で分岐させる構造にリファクタ。早期 return だけだと今後ワークフローが増えた際に if が肥大化するため、ワークフロー単位でブロックを分けたVRT: 既存のパッケージプラグイン検証スキップ + スナップショット参照ファイル確認Upload For AppStore:GOOGLESERVICE_INFOをhomete/GoogleService-Info.plistにデコードUpload Stg TestFlight:GOOGLESERVICE_INFOをhomete/GoogleService-Info-dev.plistにデコード(同名環境変数だが、Xcode Cloud はワークフロー毎に値を切り替えられるためそれを利用)ci_pre_xcodebuild.shを新規追加:Upload For AppStore時のみxcrun agvtool new-version -all \$CI_BUILD_NUMBERで全Target のビルド番号を更新ci_post_xcodebuild.shを新規追加: archive 成功時のみv{version}の git タグを作成。タグ名はagvtool what-marketing-versionでCFBundleShortVersionStringから自動取得することで、ビルドした成果物のバージョンと確実にタグを揃えるGITHUB_TOKEN環境変数が設定されている時のみ実行する仕様にした。Xcode Cloud から GitHub への push 用認証は別途セットアップが必要で、未設定時にもジョブを失敗させないよう警告ログのみ出して継続する形にしている確認内容
なし