@@ -260,13 +260,25 @@ generate_swift_package () {
260
260
template_replace $package " // GENERATE BINARIES" $binaries ; rm -f $binaries
261
261
}
262
262
263
+ login_default () {
264
+ echo " $GITHUB_TOKEN " | gh auth login --with-token
265
+ }
266
+
267
+ login_reviewer () {
268
+ echo " $REVIEWER_TOKEN " | gh auth login --with-token
269
+ }
270
+
263
271
commit_changes () {
264
272
branch=$1
265
273
git checkout -b $branch
266
274
git add .
267
275
git commit -m" Updated Package.swift and sources for latest firebase sdks"
268
276
git push -u origin $branch
269
277
gh pr create --fill
278
+ login_reviewer
279
+ gh pr review --approve
280
+ login_default
281
+ gh pr merge --squash
270
282
}
271
283
272
284
# Exit when any command fails
@@ -277,6 +289,8 @@ set -o pipefail
277
289
firebase_repo=" https://github.com/firebase/firebase-ios-sdk"
278
290
xcframeworks_repo=" https://github.com/afresh-technologies/firebase-ios-sdk-xcframeworks"
279
291
292
+ login_default
293
+
280
294
# Release versions
281
295
latest=$( latest_release_number $firebase_repo )
282
296
current=$( latest_release_number $xcframeworks_repo )
@@ -329,13 +343,13 @@ if [[ $latest != $current || $debug ]]; then
329
343
mv " $scratch /$package " " $package "
330
344
331
345
# Skips deploy
332
- # if [[ $skip_release ]]; then echo "Done."; exit 0; fi
346
+ if [[ $skip_release ]]; then echo " Done." ; exit 0; fi
333
347
334
348
# Deploy to repository
335
349
echo " Merging changes to Github..."
336
350
commit_changes " release/$latest "
337
351
echo " Creating release draft"
338
- echo " Release $latest " | gh release create --target " release/ $latest " --draft $latest $scratch /dist/* .xcframework.zip
352
+ echo " Release $latest " | gh release create --title " $latest " --target " release/ $latest " $latest $scratch /dist/* .xcframework.zip
339
353
else
340
354
echo " $current is up to date."
341
355
fi
0 commit comments