mirror of
https://github.com/RetroDECK/RetroVERSE.git
synced 2026-12-01 00:26:40 +00:00
Improve RetroVERSE workflow previous metadata lookup
This commit is contained in:
parent
4628783bd4
commit
0b680b7840
6
.github/workflows/retroverse-build.yml
vendored
6
.github/workflows/retroverse-build.yml
vendored
|
|
@ -436,8 +436,10 @@ jobs:
|
||||||
|
|
||||||
echo "Looking for previous release on branch: ${BRANCH_NAME}"
|
echo "Looking for previous release on branch: ${BRANCH_NAME}"
|
||||||
|
|
||||||
PREV_RELEASE=$(gh release list --limit 100 --json tagName \
|
# Newest published, non-draft release for this branch. Sorted by publishedAt:
|
||||||
-q "[.[] | select(.tagName | startswith(\"${BRANCH_NAME}-\"))] | .[0].tagName")
|
# createdAt is unreliable after bulk migrations.
|
||||||
|
PREV_RELEASE=$(gh release list --limit 100 --json tagName,publishedAt,isDraft \
|
||||||
|
-q "[.[] | select((.isDraft | not) and (.tagName | startswith(\"${BRANCH_NAME}-\")))] | sort_by(.publishedAt) | last | .tagName")
|
||||||
|
|
||||||
if [[ -z "$PREV_RELEASE" || "$PREV_RELEASE" == "null" ]]; then
|
if [[ -z "$PREV_RELEASE" || "$PREV_RELEASE" == "null" ]]; then
|
||||||
echo "No previous release found for branch ${BRANCH_NAME}"
|
echo "No previous release found for branch ${BRANCH_NAME}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue