Compare commits
No commits in common. "b22bb49cec87b863a6df5b872a8fe8c5e34e9636" and "1eeb81d98dcadeb7976dec3e8cacbd23bf31edb1" have entirely different histories.
b22bb49cec
...
1eeb81d98d
1 changed files with 9 additions and 4 deletions
|
@ -46,13 +46,18 @@ jobs:
|
|||
# Get the current tag name (e.g., v1.0.0)
|
||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||
|
||||
# Find the previous tag (if it exists)
|
||||
PREVIOUS_TAG=$(git describe --tags --abbrev=0 --match "v*" $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
|
||||
# Find the commit where this tag was created
|
||||
TAG_COMMIT=$(git rev-list -n 1 $TAG_NAME)
|
||||
|
||||
# Get commit messages between the previous tag and the current tag
|
||||
# Find the previous tag (if it exists)
|
||||
PREVIOUS_TAG=$(git describe --tags --abbrev=0 --match "v*" $TAG_COMMIT^ 2>/dev/null || echo "")
|
||||
|
||||
# Get commit messages only for the current tag
|
||||
if [ -z "$PREVIOUS_TAG" ]; then
|
||||
COMMITS=$(git log --pretty=format:'- %s' $TAG_NAME --no-merges)
|
||||
# No previous tag, show all commits leading up to this tag
|
||||
COMMITS=$(git log --pretty=format:'- %s' $TAG_COMMIT --no-merges)
|
||||
else
|
||||
# Show commits only between the previous tag and the current tag
|
||||
COMMITS=$(git log $PREVIOUS_TAG..$TAG_NAME --pretty=format:'- %s' --no-merges)
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue