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 f0d784c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 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,9 +38,8 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Please see the root of the repository for the CHANGELOG.md
draft: false
body: ${{ steps.release_notes.outputs.changelog }}
draft: true
prerelease: false
- name: Build and publish to PyPI
env:
Expand Down

0 comments on commit f0d784c

Please sign in to comment.