Skip to content

Workflow file for this run

name: Create Release Note
on:
pull_request:
# PRが閉じたタイミングで実行
types:
- closed
# mainブランチのみを対象とする
branches:
- main
permissions:
contents: read
jobs:
release:
permissions:
# write permission is required to create a github release
contents: write
# リリースノートを書くためwrite用のpermissionを付与
pull-requests: write
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release')
runs-on: ubuntu-latest
steps:
- name: Create Release Tag And Note
env:
# このトークンは自動生成されるのでsecretsを登録する必要ない
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PRのタイトルと内容をRelease内容に追加する
RELEASE_TAG: ${{ github.event.pull_request.title }}
uses: release-drafter/release-drafter@v5
with:
tag: ${{ env.RELEASE_TAG }}
name: v${{ env.RELEASE_TAG }}
version: ${{ env.RELEASE_TAG }}
publish: true