test #8
Workflow file for this run
This file contains 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
name: Release Notes | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
generate-release-notes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- 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 "::set-output name=pr_list::$PRS" | |
- name: Generate Release Notes | |
run: | | |
echo "## What's Changed" > release-notes.md | |
echo "" >> release-notes.md | |
echo "${{ steps.get_prs.outputs.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@v1 | |
with: | |
tag_name: ${{ github.ref_name }} # refs/tags/ 없이 태그 이름만 사용 | |
name: 'Release ${{ github.ref_name }}' | |
body: | | |
$(cat release-notes.md) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |