Skip to content

Commit 259e375

Browse files
committed
update release note searching
1 parent 69efdd8 commit 259e375

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/bump-native-version.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
- name: Gather all release notes between versions
8383
id: notes
8484
run: |
85+
set -e
8586
ANDROID_OLD=${{ steps.current.outputs.android_current }}
8687
ANDROID_NEW=${{ inputs.android_version }}
8788
IOS_OLD=${{ steps.current.outputs.ios_current }}
@@ -91,22 +92,32 @@ jobs:
9192
local repo=$1
9293
local from=$2
9394
local to=$3
94-
RELEASES=$(gh release list --repo "$repo" --limit 200 --json tagName --jq '.[] | .tagName' | sort -V)
95+
96+
echo "🔎 Gathering release notes for $repo from $from → $to"
97+
RELEASES=$(gh release list --repo "$repo" --limit 200 --json tagName --jq '.[] | .tagName' | sed 's/^Release //g' | sort -V)
9598
START=0
9699
NOTES=""
100+
FOUND=0
101+
97102
for TAG in $RELEASES; do
103+
echo "Checking tag: $TAG"
98104
if [[ "$TAG" == "$from" ]]; then
99105
START=1
100106
continue
101107
fi
102108
if [[ "$START" -eq 1 ]]; then
103-
BODY=$(gh release view "$TAG" --repo "$repo" --json body,tagName --jq '". - ### " + .tagName + "\n" + .body')
109+
BODY=$(gh release view "$TAG" --repo "$repo" --json body,tagName --jq '". - ### " + .tagName + "\n" + (.body // "")')
104110
NOTES+="$BODY\n\n"
111+
FOUND=1
105112
fi
106113
if [[ "$TAG" == "$to" ]]; then
107114
break
108115
fi
109116
done
117+
118+
if [[ "$FOUND" -eq 0 ]]; then
119+
echo "⚠️ No notes found between $from → $to (maybe tag name mismatch)"
120+
fi
110121
echo -e "$NOTES"
111122
}
112123
@@ -120,6 +131,7 @@ jobs:
120131
echo "$IOS_NOTES" >> $GITHUB_OUTPUT
121132
echo "EOF" >> $GITHUB_OUTPUT
122133
134+
123135
- name: Update native SDK versions in Unity dependencies
124136
run: |
125137
ANDROID_NEW=${{ inputs.android_version }}

0 commit comments

Comments
 (0)