github-actions[bot] commited on
Commit
62098cc
·
1 Parent(s): f9d57df

Fix(ci): Use GitHub API to find latest release tag

Browse files
Files changed (1) hide show
  1. .github/workflows/build.yml +3 -1
.github/workflows/build.yml CHANGED
@@ -109,7 +109,9 @@ jobs:
109
  id: changelog
110
  shell: bash
111
  run: |
112
- LAST_TAG=$(git describe --tags --abbrev=0 --match="build-*" 2>/dev/null || echo "")
 
 
113
  RANGE="${LAST_TAG:+$LAST_TAG..HEAD}"
114
  echo "🔍 Generating changelog for build-${{ steps.version.outputs.version }} ($RANGE)"
115
 
 
109
  id: changelog
110
  shell: bash
111
  run: |
112
+ # Fetch the latest release tag directly from the GitHub API
113
+ LAST_TAG=$(gh release list --limit 1 --json tagName --jq .[0].tagName 2>/dev/null || echo "")
114
+
115
  RANGE="${LAST_TAG:+$LAST_TAG..HEAD}"
116
  echo "🔍 Generating changelog for build-${{ steps.version.outputs.version }} ($RANGE)"
117