Skip to content

Release Notes

Release Notes #11

Workflow file for this run

name: Release Notes
on:
push:
tags:
- 'v*'
jobs:
generate-release-notes:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Get Pull Requests
id: get_prs
run: |
PRS=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls?state=closed" | \
jq -r '.[] | select(.merged_at != null) | "- [\(.title)](\(.html_url))"')
echo "pr_list<<EOF" >> $GITHUB_ENV
echo "$PRS" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Generate Release Notes
run: |
echo "## What's Changed" > release-notes.md
echo "" >> release-notes.md
echo "${{ env.pr_list }}" >> release-notes.md # 환경 변수 사용
echo "" >> release-notes.md
echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }}...${{ github.ref_name }}" >> release-notes.md
- name: Publish Release Notes
uses: softprops/action-gh-release@v2 # 최신 버전으로 업데이트
with:
tag_name: ${{ github.ref_name }} # refs/tags/ 없이 태그 이름만 사용
name: 'Release ${{ github.ref_name }}'
body: |
$(< release-notes.md) # 파일 내용 읽기
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}