Skip to content

Commit

Permalink
Use the annotated tag message for release body
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Nov 9, 2020
1 parent ce46612 commit 799c462
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel twine
- name: Get release notes
id: release_notes
run: |
CHANGELOG=$(git tag -l --format='%(contents)' ${{ github.ref }})
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::$CHANGELOG"
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
Expand All @@ -30,8 +38,7 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Please see the root of the repository for the CHANGELOG.md
body: ${{ steps.release_notes.outputs.changelog }}
draft: false
prerelease: false
- name: Build and publish to PyPI
Expand Down

0 comments on commit 799c462

Please sign in to comment.