We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78caa9c commit 6264fe9Copy full SHA for 6264fe9
1 file changed
.github/workflows/publish-maven.yml
@@ -183,7 +183,12 @@ jobs:
183
RELEASE_NOTES=$(envsubst < .github/workflows/notes.template)
184
185
# Get the previous tag for generating notes
186
- PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
+ # Fetch all tags and find the previous version tag (excluding 'latest' and the current tag)
187
+ CURRENT_TAG="v${VERSION}"
188
+ PREV_TAG=$(git tag -l 'v*' --sort=-version:refname | grep -v "^${CURRENT_TAG}$" | grep -v "^latest$" | head -n 1)
189
+
190
+ echo "Current tag: ${CURRENT_TAG}"
191
+ echo "Previous tag: ${PREV_TAG}"
192
193
# Build the gh release command
194
GH_ARGS=("v${VERSION}")
0 commit comments