Skip to content

Commit 11d50a7

Browse files
committed
ci(workflows): append detailed changes link to release notes
1 parent 1cd5393 commit 11d50a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
VER="${TAG#v}"
6666
# Extract the section between this version's header and the next
6767
awk "/^## v${VER//./\\.} /{found=1; next} /^## v[0-9]/{if(found) exit} found" CHANGELOG.md > /tmp/release_notes.md
68+
PREV_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]' | sed -n '2p')
69+
if [ -n "$PREV_TAG" ]; then
70+
REPO="${{ github.repository }}"
71+
printf '\n---\n\n**Detailed Changes**: [%s...%s](https://github.com/%s/compare/%s...%s)\n' \
72+
"$PREV_TAG" "$TAG" "$REPO" "$PREV_TAG" "$TAG" >> /tmp/release_notes.md
73+
fi
6874
6975
- name: Create GitHub Release
7076
if: steps.release.outputs.released == 'true'

0 commit comments

Comments
 (0)