We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent1290de9 commit6fef27aCopy full SHA for 6fef27a
.github/workflows/main.yml
@@ -58,12 +58,16 @@ jobs:
58
id:get_commits
59
shell:bash
60
run:|
61
- # Get the most recent tag (assuming releases are tagged)
62
- PREV_TAG=$(git describe --tags --abbrev=0)
63
- echo "Previous tag: $PREV_TAG"
64
-
65
- # List commits since last tag
66
- COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s" --no-merges)
+ # Get the most recent tag
+ PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")
+ if [ "$PREV_TAG" = "none" ]; then
+ echo "No previous tag found, listing all commits"
+ COMMITS=$(git log --pretty=format:"* %s" --no-merges)
+ else
67
+ echo "Previous tag: $PREV_TAG"
68
+ # List commits since last tag
69
+ COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s" --no-merges)
70
+ fi
71
echo "Commits since last release: $COMMITS"
72
73
# Save commits to environment file for later use