Skip to content

Commit 6c3e379

Browse files
committed
update release note searching
1 parent 69efdd8 commit 6c3e379

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ jobs:
8181
8282
- name: Gather all release notes between versions
8383
id: notes
84+
env:
85+
GH_TOKEN: ${{ secrets.ONESIGNAL_PAT }}
8486
run: |
8587
ANDROID_OLD=${{ steps.current.outputs.android_current }}
8688
ANDROID_NEW=${{ inputs.android_version }}
@@ -91,22 +93,35 @@ jobs:
9193
local repo=$1
9294
local from=$2
9395
local to=$3
94-
RELEASES=$(gh release list --repo "$repo" --limit 200 --json tagName --jq '.[] | .tagName' | sort -V)
96+
97+
echo "🔎 Gathering release notes for $repo from $from → $to"
98+
RELEASES=$(gh release list --repo "$repo" --limit 200 --json tagName --jq '.[] | .tagName' | sed 's/^Release //g' | sort -V)
9599
START=0
96100
NOTES=""
101+
FOUND=0
102+
97103
for TAG in $RELEASES; do
104+
echo "Checking tag: $TAG"
98105
if [[ "$TAG" == "$from" ]]; then
99106
START=1
100107
continue
101108
fi
102109
if [[ "$START" -eq 1 ]]; then
103-
BODY=$(gh release view "$TAG" --repo "$repo" --json body,tagName --jq '". - ### " + .tagName + "\n" + .body')
104-
NOTES+="$BODY\n\n"
110+
BODY=$(gh release view "$TAG" --repo "$repo" --json body,tagName --jq '". - ### " + .tagName + "\n" + (.body // "")' 2>/dev/null || true)
111+
if [[ -n "$BODY" ]]; then
112+
NOTES+="$BODY\n\n"
113+
FOUND=1
114+
fi
105115
fi
106116
if [[ "$TAG" == "$to" ]]; then
107117
break
108118
fi
109119
done
120+
121+
if [[ "$FOUND" -eq 0 ]]; then
122+
echo "⚠️ No notes found between $from → $to (possibly mismatched tags)"
123+
fi
124+
110125
echo -e "$NOTES"
111126
}
112127
@@ -120,6 +135,8 @@ jobs:
120135
echo "$IOS_NOTES" >> $GITHUB_OUTPUT
121136
echo "EOF" >> $GITHUB_OUTPUT
122137
138+
139+
123140
- name: Update native SDK versions in Unity dependencies
124141
run: |
125142
ANDROID_NEW=${{ inputs.android_version }}

0 commit comments

Comments
 (0)