Summary: This PR adds a github action to publish pods on a new tag. It also tries to fix a race condition which happens when we try to publish FlipperKit pod. During the release of FlipperKit pod, we rely on the newly published Flipper Pod, and sometimes the release of Flipper Pod takes a time to get updated in the cocoapods trunk. This is a known issue by the Cocoapods and they will be shipping a fix to this in Cocoapods 1.10. Till then we can keep retrying for 5 times. Ref: https://github.com/CocoaPods/CocoaPods/issues/9502#issuecomment-579486258 ## Changelog - Adds Github actions to publish cocoapods. - Removes the Circle CI config to publish on cocoapods Pull Request resolved: https://github.com/facebook/flipper/pull/1083 Test Plan: I tested this action by running it on this PR and it worked fine. Reviewed By: jknoxville Differential Revision: D21348084 Pulled By: priteshrnandgaonkar fbshipit-source-id: f33f3cdef43ae032ad42c94db72323212e40ec67
42 lines
1.2 KiB
YAML
42 lines
1.2 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 5 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..5}; do pod trunk push FlipperKit.podspec --use-libraries --allow-warnings --verbose --skip-import-validation && break || sleep 20; done
|
|
env:
|
|
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
|