mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-13 06:56:06 +00:00
Fix release notes generation: properly detect previous tag
The script was failing because git describe --tags --abbrev=0 HEAD^ returns the current HEAD commit SHA when no tag exists before HEAD, resulting in comparing HEAD..HEAD which has zero commits. Now using git tag --sort=-version:refname to get the latest tag (excluding the version being released) which will properly compare v4.29.0 with v4.28.0.
This commit is contained in:
parent
f78c58c9a7
commit
70b321a450
1 changed files with 3 additions and 3 deletions
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -164,11 +164,11 @@ jobs:
|
|||
run: |
|
||||
echo "Generating release notes using LLM..."
|
||||
|
||||
# Find previous release tag
|
||||
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
||||
# Find previous release tag (latest tag excluding current if it exists)
|
||||
PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -v "^v${{ inputs.version }}$" | head -1)
|
||||
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
echo "No previous tag found, using all commits"
|
||||
echo "No previous tag found, comparing with first commit"
|
||||
PREVIOUS_TAG=$(git rev-list --max-parents=0 HEAD)
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue