File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -243,12 +243,18 @@ jobs:
243243 id : release_body
244244 run : |
245245 VERSION="${{ needs.prepare.outputs.version }}"
246- echo "Debug: Listing tags"
247- git tag -l
248- echo "Debug: Getting latest tag"
249- git describe --tags --abbrev=0 || echo "No tags found"
250- echo "Debug: Generating changelog"
251- CHANGES=$(git log "$(git describe --tags --abbrev=0 2>/dev/null || echo HEAD^)" HEAD --pretty=format:"- %s" || echo "No changelog available")
246+
247+ # Get the most recent release tag (v* tags only)
248+ LAST_TAG=$(git describe --match "v*" --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` 2>/dev/null || echo "")
249+
250+ if [ -n "$LAST_TAG" ]; then
251+ echo "Debug: Found last release tag: $LAST_TAG"
252+ CHANGES=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s")
253+ else
254+ echo "Debug: No previous release tag found, using first commit"
255+ CHANGES=$(git log --pretty=format:"- %s")
256+ fi
257+
252258 echo "Debug: Changelog content:"
253259 echo "$CHANGES"
254260
You can’t perform that action at this time.
0 commit comments