ci: リリースPRマージ時の処理をタグ作成とGitHub Release公開だけにする - #324
Conversation
メタデータ同期の起動とXcode Cloud「Upload For AppStore」の起動を release-merged.ymlから外す。sync-metadata.ymlは手動実行用に残す。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d521e8fb16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ASC_API_KEY_PATH="$KEY_PATH" ./scripts/trigger-xcode-cloud-build.sh "$XCODE_CLOUD_APPSTORE_WORKFLOW_ID" main | ||
| rm -f "$KEY_PATH" | ||
|
|
||
| - name: Create summary |
There was a problem hiding this comment.
Update the release PR guidance after disabling automation
When a release PR is created through .github/workflows/create-release-pr.yml, its generated body still says that merging automatically runs metadata synchronization and the Xcode Cloud Upload For AppStore workflow (lines 98–100). This workflow now proceeds directly from publishing the GitHub Release to its summary, so an operator following the PR instructions can omit both newly manual steps and leave the App Store release incomplete. Update the generated PR body/checklist to describe the required manual steps and their order.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
ご指摘ありがとうございます。f0fd2616 で対応しました。create-release-pr.yml が生成するリリースPRの本文を「マージで自動実行されるのはタグ作成とGitHub Release publishだけ」に直し、マージ後に手動で行う手順(Sync Metadata → Xcode CloudのUpload For AppStore)を、順番付きのチェックリストとして追加しました。
There was a problem hiding this comment.
追加対応: 3be03e2 でマージ後の手動手順を削除しました。Xcode Cloudの「Upload For AppStore」の開始条件を release/ ブランチへの変更に変えるため、マージ後に手動で実行する処理はなくなります(メタデータ同期も不要)。リリースPRの本文は、PRへのpushでTestFlight配信とApp Storeへのアップロードが走り、マージではタグ作成とGitHub Release publishだけが走る、という説明にしました。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
マージ後の手動手順は不要になったので削除する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76d999b421
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if gh release view "$VERSION" > /dev/null 2>&1; then | ||
| gh release delete "$VERSION" --yes | ||
| fi |
There was a problem hiding this comment.
Handle immutable releases before force-pushing their tags
When release immutability is enabled and this job is rerun for a version whose published release already exists, the force-push on line 44 runs before this cleanup. gh release create --help documents that under immutable releases, “Git tags associated with a release cannot be modified or deleted,” so the push fails and these deletion lines are never reached, defeating the newly added release-recreation path. Handle the existing release before attempting to move its tag, or avoid force-updating the tag.
Useful? React with 👍 / 👎.
経緯
v1.0.0のリリースPRをマージしたとき、
Release MergedワークフローのTrigger Xcode Cloud Upload For AppStore buildステップが失敗した(run)。XCODE_CLOUD_APPSTORE_WORKFLOW_IDシークレットが登録されておらず、scripts/trigger-xcode-cloud-build.shに空のワークフローIDが渡ったのが原因。リリースは別の手段で完了しており、PRマージ時に自動で行いたいのはタグの作成とGitHub Releaseの公開だけなので、ワークフローからそれ以外の処理を外す。
実装内容
release-merged.ymlから次の2ステップを削除ciBuildRunsの作成)も一度も動作確認できていないsync-metadata.ymlの起動: マージ時に自動で走らせる必要がないため。ワークフロー自体は残し、必要なときにworkflow_dispatchで手動実行するpermissionsからactions: writeを外した(最小権限)git tag -f/git push -fで上書きされるのに、Releaseはgh release createが既存のReleaseでエラーになり、同じバージョンで再実行できなかったため。削除に--cleanup-tagは付けない(直前にpushしたタグまで消えるため)scripts/trigger-xcode-cloud-build.shを削除sync-metadata.yml/ci_post_xcodebuild.sh/Fastfile)create-release-pr.ymlが作るリリースPRの本文を、実際の動きに合わせて直した。以前は「マージするとメタデータ同期とXcode CloudのUpload For AppStoreが自動で走る」と書かれていたrelease/ブランチへの変更」に変える(リポジトリ外の設定変更)。これにより、マージ時のタグpushでは起動しなくなる確認内容
Release MergedがタグのpushとGitHub Releaseの公開まで成功するrelease/ブランチへの変更になっているtrigger-xcode-cloud-build.sh/XCODE_CLOUD_APPSTORE_WORKFLOW_IDへの参照が残っていない(ADRの経緯説明を除く)🤖 Generated with Claude Code