Skip to content

High performance self-hosted photo and video management solution.

fix: pick the previous release by version, not reachability (#31884)

bo0tzz75b4e33143e0
diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml
index b94af4047d..a1193ad97f 100644
--- a/.github/workflows/draft-release.yml
+++ b/.github/workflows/draft-release.yml
@@ -144,11 +144,11 @@ jobs:
PRERELEASE: ${{ needs.tag.outputs.rc }}
BRANCH: ${{ github.ref_name }}
run: |
- exclude=()
+ tags=$(git -c versionsort.suffix=-rc tag --list 'v[0-9]*' --sort=-v:refname)
if [[ "${PRERELEASE}" != 'true' ]]; then
- exclude=(--exclude '*-rc*')
+ tags=$(grep -v -- '-rc.' <<< "${tags}")
fi
- previous=$(git describe --tags --abbrev=0 --match 'v*' "${exclude[@]}" --exclude "${TAG}" HEAD)
+ previous=$(grep -A1 -xF "${TAG}" <<< "${tags}" | tail -1)
echo "generating notes from ${previous}"
gh release create "${TAG}" \