diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 698f3f5..b2f219e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,10 +47,11 @@ jobs: chmod +x "$dir/myrc" tar -czf "$dir.tar.gz" -C "$dir" myrc done + tag="${{ steps.tag.outputs.tag }}" - #body="TODO" - #gh release create "$tag" --draft --generate-notes --notes "$body" *.tar.gz - gh release create "$tag" --draft --generate-notes *.tar.gz + body="$(awk "/## \\[${tag#v}\\]/{flag=1;next}/## \\[/{flag=0}flag" CHANGELOG.md)" + + gh release create "$tag" --draft --generate-notes --notes "$body" *.tar.gz # the "$tag" value is incorrect for draft release (the correct one # returns previous gh release command)