File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,14 +63,11 @@ jobs:
6363 BUMP_TYPE : ${{ inputs.bumpType || 'patch' }}
6464 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6565 run : |
66- # --- Find the latest published GitHub Release tag ---
67- # Using gh release list instead of git tags ensures we reference the
68- # last *successfully published* release, not an orphan tag left behind
69- # by a failed release workflow run.
70- # - Filter to v* tags only (aligned with the git tag fallback)
71- # - Use jq's // operator to handle empty arrays (avoids literal "null")
72- LATEST_RELEASE_TAG=$(gh release list --limit 100 --json tagName \
73- --jq '[.[] | select(.tagName | startswith("v"))] | sort_by(.tagName) | last | .tagName // ""' \
66+ # --- Find the latest published GitHub Release tag ---
67+ # gh release list defaults to --order desc (newest first by creation
68+ # date), so --limit 1 gives us the most recent release.
69+ LATEST_RELEASE_TAG=$(gh release list --limit 1 --json tagName \
70+ --jq '.[0].tagName // ""' \
7471 2>/dev/null || echo "")
7572
7673 if [ -n "$LATEST_RELEASE_TAG" ]; then
You can’t perform that action at this time.
0 commit comments