update release workflow to include commit descriptions
like this description right here :)
This commit is contained in:
parent
8ed01e7fe6
commit
5e46502ee3
1 changed files with 15 additions and 3 deletions
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
|
@ -134,6 +134,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
version="${{ steps.package-version.outputs.version }}"
|
version="${{ steps.package-version.outputs.version }}"
|
||||||
tag="v${version}"
|
tag="v${version}"
|
||||||
|
repo_url="${{ github.server_url }}/${{ github.repository }}"
|
||||||
previous_tag="$(git tag --merged HEAD --sort=-v:refname | grep -E '^v[0-9]+(\.[0-9]+)*' | grep -vx "$tag" | head -n 1 || true)"
|
previous_tag="$(git tag --merged HEAD --sort=-v:refname | grep -E '^v[0-9]+(\.[0-9]+)*' | grep -vx "$tag" | head -n 1 || true)"
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -143,12 +144,23 @@ jobs:
|
||||||
echo
|
echo
|
||||||
if [ -n "$previous_tag" ]; then
|
if [ -n "$previous_tag" ]; then
|
||||||
echo "Changes since ${previous_tag}:"
|
echo "Changes since ${previous_tag}:"
|
||||||
echo
|
commit_range="${previous_tag}..HEAD"
|
||||||
git log "${previous_tag}..HEAD" --pretty=format:'- `%h` %s'
|
|
||||||
else
|
else
|
||||||
git log --pretty=format:'- `%h` %s'
|
commit_range="HEAD"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
while IFS= read -r commit; do
|
||||||
|
short_hash="$(git show -s --format='%h' "$commit")"
|
||||||
|
title="$(git show -s --format='%s' "$commit")"
|
||||||
|
description="$(git show -s --format='%b' "$commit")"
|
||||||
|
|
||||||
|
echo "- [\`${short_hash}\`](${repo_url}/commit/${commit}) ${title}"
|
||||||
|
if [ -n "$description" ]; then
|
||||||
|
echo "$description" | sed 's/^/ /'
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
done < <(git rev-list "$commit_range")
|
||||||
} > release-notes.md
|
} > release-notes.md
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue