File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments