💚 Fix auto release actions

This commit is contained in:
Baptiste Arnaud
2022-10-16 11:08:20 +02:00
parent c7370e3742
commit f36210b1b5
2 changed files with 19 additions and 13 deletions

View File

@@ -12,15 +12,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Extract body from changelog
id: extract
run: |
NEW_VERSION=${{ github.ref }} | sed 's/v//'
echo $NEW_VERSION
RELEASE_BODY=$(sed -n -e "/## ${NEW_VERSION}/,/<a/ p" ./CHANGELOG.md | sed -e '1d;$d')
echo "::set-output name=body::${RELEASE_BODY}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_VERSION: ${{ github.ref }} | sed 's/v//'
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: sed -n -e '/## ${{NEW_VERSION}}/,/<a/ p' ./CHANGELOG.md | sed -e '1d;$d'
body: |
${{ steps.extract.outputs.body }}
draft: false
prerelease: false