Skip to content

Commit

Permalink
Add step to get tag name in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
klane committed Dec 22, 2019
1 parent be83d8a commit 82a7ad9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/v}
- name: Get changes
id: changelog
run: |
pattern='0,/${GITHUB_REF#refs/tags/v}/d;/[0-9]\+\.[0-9]\+\.[0-9]\+/Q'
pattern='0,/${{ steps.tag.outputs.tag }}/d;/[0-9]\+\.[0-9]\+\.[0-9]\+/Q'
echo ::set-output name=changelog::$(sed $pattern CHANGELOG.md | head -n -1 | tail -n +2)
- name: Create release
uses: actions/create-release@master
Expand Down

0 comments on commit 82a7ad9

Please sign in to comment.