Skip to content

Commit

Permalink
Get actual tag name, fix newlines in release body
Browse files Browse the repository at this point in the history
  • Loading branch information
sean0x42 authored Jan 23, 2020
1 parent 3d652f0 commit 427d33c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,26 @@ jobs:
- name: Install markdown-extract
run: cargo install markdown-extract

- name: Get tag string
id: tag
run: echo ::set-output name=value::${GITHUB_REF/refs\/tags\//}

- name: Get release body
run: export RELEASE_BODY=`markdown-extract --ignore-first-heading ${{ github.ref }} CHANGELOG.md`
id: release_notes
run: |
text=`~/.cargo/bin/markdown-extract -i ${{ steps.tag.outputs.value }} CHANGELOG.md`
echo $text
text="${text//'%'/'%25'}"
text="${text//$'\n'/'%0A'}"
text="${text//$'\r'/'%0D'}"
echo "::set-output name=value::$text"
- name: Create release
id: create_release
uses: actions/create-release@v1
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ env.RELEASE_BODY }}
release_name: Release ${{ steps.tags.outputs.value }}
body: ${{ steps.release_notes.outputs.value }}

0 comments on commit 427d33c

Please sign in to comment.