Skip to content

Commit 013d23b

Browse files
committed
ci: include all commits in release notes
1 parent 055a043 commit 013d23b

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ jobs:
139139

140140
steps:
141141
- uses: actions/checkout@v7
142+
with:
143+
fetch-depth: 0
142144
- uses: actions/download-artifact@v8
143145
with:
144146
path: dist
@@ -149,11 +151,29 @@ jobs:
149151
find dist -mindepth 1 -type d -empty -delete
150152
ls -lh dist
151153
154+
- name: Generate release notes
155+
shell: bash
156+
run: |
157+
previous_tag=$(git describe --tags --match "v[0-9]*" --abbrev=0 "${GITHUB_REF_NAME}^" 2>/dev/null || true)
158+
repository_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
159+
160+
{
161+
echo "### What's Changed"
162+
echo
163+
if [[ -n "$previous_tag" ]]; then
164+
git log --reverse --format="- %s [\`%h\`](${repository_url}/commit/%H)" "${previous_tag}..${GITHUB_REF_NAME}"
165+
echo
166+
echo "**Full Changelog:** [${previous_tag}...${GITHUB_REF_NAME}](${repository_url}/compare/${previous_tag}...${GITHUB_REF_NAME})"
167+
else
168+
git log --reverse --format="- %s [\`%h\`](${repository_url}/commit/%H)" "$GITHUB_REF_NAME"
169+
fi
170+
} > /tmp/release-notes.md
171+
152172
- name: GitHub release
153173
uses: softprops/action-gh-release@v3
154174
with:
155175
files: dist/*
156-
generate_release_notes: true
176+
body_path: /tmp/release-notes.md
157177

158178
- name: Compute checksums
159179
id: sha

0 commit comments

Comments
 (0)