Skip to content

infra(ci-cd): GitHub Release 自動生成の共通基盤(reusable create-release + channel 比較 + release.yml) #628

Description

@win2cot

親: #206

概要

全デプロイタグ push で GitHub Release を自動生成する共通基盤を整備する(ADR-0030)。各 deploy workflow(#481 / #482 / #483 + infra #484 retrofit)から呼ぶ reusable workflow / composite を 1 つ用意し、4 本で DRY 化する。目的は「内部の人 / Claude が、どの環境に何がリリースされたかを Release 一覧で把握する」こと(外部ユーザー向け公開ではない)。

claude-automation 不適用: .github/workflows 編集系のため case B(人手 PR 固定)。

やること

  • reusable workflow(または composite action)create-release を新設し、deploy 成功後に呼ばれる構成にする:
    • gh release create "<deploy-tag>" --generate-notes --notes-start-tag "<channel 前回タグ>" [--prerelease] --latest[=false] --title "<component> vX.Y.Z (<env>)"
  • channel 比較(ADR-0030 論点3): previous tag は 同 component・同 env の直前タグに解決(他環境とは比較しない)
    • 例: webapi-v1.2.0-stggit tag --list 'webapi-v*-stg' --sort=-v:refname の直前(webapi-v1.1.0-stg)を --notes-start-tag に渡す
    • prd(suffix なし)は -dev / -stggrep -v で除外する filter を入れる
    • channel に前タグが無い初回は --notes-start-tag 省略(空でも作成成功させる)
  • pre-release バッジ: dev / stg = --prerelease(かつ --latest=false)、prd(素タグ)= --latest
  • .github/release.yml を追加し area/* ラベルで changelog をカテゴリ分け
  • Release 作成失敗は deploy を fail させない(non-blocking、warning のみ)
  • 過度な抽象化はしない(infra(ci-cd): Phase 1 Sprint 2 — keycloak custom tag → ECR push + ECS update(S2Infra-5) #482 の共通化方針に整合)

依存

受入基準

  • 任意の <component>-vX.Y.Z[-env] タグ push で、対応する GitHub Release が channel 比較ノート付きで作成される
  • dev / stg Release が pre-release、prd Release が latest になる
  • Release 作成失敗時に deploy job が落ちない
  • .github/release.yml により PR が area/* でカテゴリ表示される

関連

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ci.github/workflows / CI/CD パイプライン変更area/infraAWS インフラ(ECS Fargate / RDS / Keycloak / IAM)変更priority/p2Medium。完了が望ましいが柔軟に判断可task-type:implコード実装が主体のタスク

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions