From 51d738a4424866e693205e2dd88bf1df95086d23 Mon Sep 17 00:00:00 2001 From: Julian Lechner Date: Sat, 23 May 2026 21:17:49 +0200 Subject: [PATCH] fix: rollout --- .github/workflows/Build-Rollout.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build-Rollout.yml b/.github/workflows/Build-Rollout.yml index ad9f667..4e20167 100644 --- a/.github/workflows/Build-Rollout.yml +++ b/.github/workflows/Build-Rollout.yml @@ -13,6 +13,9 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true - name: Use NodeJS v24.14.0 uses: actions/setup-node@v6 @@ -47,10 +50,16 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_TAG: v${{ steps.release_version.outputs.tag }} run: | + git fetch --force --tags + previous_tag="$(gh api repos/${{ github.repository }}/releases --paginate --jq '.[] | select(.draft == false) | .tag_name' | grep -Fxv "$RELEASE_TAG" | head -n 1 || true)" if [ -n "$previous_tag" ]; then - commit_messages="$(git log --reverse --format='- %s' "${previous_tag}..${GITHUB_SHA}")" + if git rev-parse --verify --quiet "${previous_tag}^{commit}" >/dev/null; then + commit_messages="$(git log --reverse --format='- %s' "${previous_tag}..${GITHUB_SHA}")" + else + commit_messages="$(git log --reverse --format='- %s' "${GITHUB_SHA}")" + fi full_changelog="https://github.com/${{ github.repository }}/compare/${previous_tag}...${RELEASE_TAG}" else commit_messages="$(git log --reverse --format='- %s' "${GITHUB_SHA}")" @@ -58,7 +67,7 @@ jobs: fi if [ -z "$commit_messages" ]; then - commit_messages='- No commits since the previous release' + commit_messages='- No commits since the previous release' fi {