Summary: It increases the retry number and the retry delay. Because the previous number of retries were too less. The link to the job which failed is [here](https://github.com/facebook/flipper/pull/1138/checks?check_run_id=649669866). ## Changelog - Increase retries and retry delay. Pull Request resolved: https://github.com/facebook/flipper/pull/1140 Test Plan: I relased a path version and it worked successfully. Here is the [job](https://github.com/facebook/flipper/actions/runs/97466572) and it also created the PR(https://github.com/facebook/flipper/issues/1141 ) Reviewed By: passy Differential Revision: D21440674 Pulled By: priteshrnandgaonkar fbshipit-source-id: f8131239d30dbd6a4589a6dc2f36893e8df0ae09
112 lines
3.4 KiB
YAML
112 lines
3.4 KiB
YAML
name: Publish Pods
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
publish_flipper_pod:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Dependences
|
|
run: pod repo update
|
|
|
|
- name: Pod Version
|
|
run: pod --version
|
|
|
|
- name: Push Flipper
|
|
run: pod trunk push Flipper.podspec --use-libraries --allow-warnings --verbose --skip-import-validation
|
|
env:
|
|
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
|
|
|
|
publish_flipperkit_pod:
|
|
needs: publish_flipper_pod
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Dependences
|
|
run: pod repo update
|
|
|
|
- name: Pod Version
|
|
run: pod --version
|
|
|
|
- name: Push FlipperKit
|
|
run: |
|
|
# Retry publishing FlipperKit 20 times. Putting this hack unless we have cocoapods 1.10. More information related to the bug https://github.com/CocoaPods/CocoaPods/issues/9502#issuecomment-579486258
|
|
for i in {1..20}; do pod trunk push FlipperKit.podspec --use-libraries --allow-warnings --verbose --skip-import-validation && break || sleep 30; done
|
|
env:
|
|
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
|
|
|
|
create_pr:
|
|
needs: publish_flipperkit_pod
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Dependencies
|
|
run: pod repo update
|
|
|
|
- name: Pod Version
|
|
run: pod --version
|
|
|
|
- name: Update Sample's Podfile.lock
|
|
run: |
|
|
cd iOS/Sample/
|
|
pod update
|
|
ls
|
|
|
|
- name: Update SampleSwift's Podfile.lock
|
|
run: |
|
|
cd iOS/SampleSwift/
|
|
pod update
|
|
ls
|
|
|
|
- name: Update Tutorial's Podfile.lock
|
|
run: |
|
|
cd iOS/Tutorial/
|
|
# Retrying an update, as Flipper and FlipperKit pod may take time to get updated on CocoaPods. Putting this hack unless we have cocoapods 1.10. More information related to the bug https://github.com/CocoaPods/CocoaPods/issues/9502#issuecomment-579486258
|
|
for i in {1..20}; do pod update && break || sleep 30; done
|
|
ls
|
|
|
|
# Followed this https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#creating-pull-requests-on-tag-push
|
|
- name: Create a temporary tag branch
|
|
run: |
|
|
git config --global user.name 'GitHub'
|
|
git config --global user.email 'noreply@github.com'
|
|
git checkout -b temp-${GITHUB_REF:10}
|
|
git push --set-upstream origin temp-${GITHUB_REF:10}
|
|
|
|
- name: Git status
|
|
run: |
|
|
git status
|
|
|
|
- name: Git diff
|
|
run: |
|
|
git diff
|
|
|
|
- name: Git branch
|
|
run: |
|
|
git branch
|
|
|
|
- name: Create PR to Update Podfile.lock
|
|
uses: peter-evans/create-pull-request@v2
|
|
with:
|
|
title: 'Automated: Update Podfile.lock'
|
|
body: |
|
|
This is an automated PR to update the Podfile.lock.
|
|
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
|
|
- Also make sure that all the dependencies are updated to the latest one.
|
|
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
|
|
base: 'master'
|
|
branch-suffix: short-commit-hash
|
|
labels: automated pr
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Delete tag branch
|
|
run: |
|
|
git push --delete origin temp-${GITHUB_REF:10}
|