Skip to content

Commit

Permalink
Prep for auto dev builds
Browse files Browse the repository at this point in the history
  • Loading branch information
shantek committed Aug 28, 2024
1 parent 13c2037 commit ec4ae95
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ jobs:
if: env.TAG_EXISTS == 'false'
id: fetch_commits
run: |
git fetch --tags
LAST_TAG=$(git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1))
COMMIT_MESSAGES=$(git log $LAST_TAG..HEAD --pretty=format:"- %s")
git fetch --tags --unshallow || true
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "")
if [ -z "$LAST_TAG" ]; then
echo "No previous tags found, using the entire history."
COMMIT_MESSAGES=$(git log --pretty=format:"- %s")
else
COMMIT_MESSAGES=$(git log $LAST_TAG..HEAD --pretty=format:"- %s")
fi
echo "COMMIT_MESSAGES<<EOF" >> $GITHUB_ENV
echo "Full Changelog:" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
Expand Down Expand Up @@ -87,4 +92,4 @@ jobs:
asset_name: HorseGuard-${{ env.VERSION }}.jar
asset_content_type: application/java-archive
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit ec4ae95

Please sign in to comment.