File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,11 +110,10 @@ jobs:
110110 VERSION="${{ inputs.android_version }}"
111111
112112 # Validate version exists on GitHub
113- RELEASE=$(curl -s -H "Authorization: token ${{ github.token }}" \
114- "https://api.github.com/repos/OneSignal/OneSignal-Android-SDK/releases/tags/${VERSION}")
115-
116-
117- if [ -z "$RELEASE" ]; then
113+ if ! curl --fail --silent --show-error --retry 4 --retry-delay 30 \
114+ -H "Authorization: token ${{ github.token }}" \
115+ "https://api.github.com/repos/OneSignal/OneSignal-Android-SDK/releases/tags/${VERSION}" \
116+ >/dev/null; then
118117 echo "✗ Android SDK version ${VERSION} not found"
119118 exit 1
120119 fi
@@ -134,10 +133,10 @@ jobs:
134133 VERSION="${{ inputs.ios_version }}"
135134
136135 # Validate version exists on GitHub
137- RELEASE=$( curl -s -H "Authorization: token ${{ github.token }}" \
138- "https://api.github.com/repos/OneSignal/OneSignal-iOS-SDK/releases/tags/${VERSION}")
139-
140- if [ -z "$RELEASE" ] ; then
136+ if ! curl --fail --silent --show-error --retry 4 --retry-delay 30 \
137+ -H "Authorization: token ${{ github.token }}" \
138+ "https://api.github.com/repos/OneSignal/OneSignal-iOS-SDK/releases/tags/${VERSION}" \
139+ >/dev/null ; then
141140 echo "✗ iOS SDK version ${VERSION} not found"
142141 exit 1
143142 fi
You can’t perform that action at this time.
0 commit comments