diff --git a/.circleci/config.yml b/.circleci/config.yml index cab56a855..f588925e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,25 +28,6 @@ jobs: command: | yes | sdkmanager "platforms;android-27" || true ./gradlew :android:assembleRelease && scripts/publish-android-release.sh - publish-pods: - macos: - xcode: "10.2.1" - steps: - - checkout - - run: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf - - run: - name: "Pod version" - command: | - pod --version - - run: - name: "Push Flipper Pod" - command: | - pod trunk push ./Flipper.podspec --use-libraries --allow-warnings --verbose --skip-import-validation - - run: - name: "Push FlipperKit Pod" - command: | - pod trunk push ./FlipperKit.podspec --use-libraries --allow-warnings --verbose --skip-import-validation --swift-version=4.2 - workflows: version: 2 build-and-deploy: @@ -61,9 +42,3 @@ workflows: only: /^v.*/ branches: ignore: /.*/ - - publish-pods: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/.github/workflows/publish-pods.yml b/.github/workflows/publish-pods.yml new file mode 100644 index 000000000..70394523c --- /dev/null +++ b/.github/workflows/publish-pods.yml @@ -0,0 +1,41 @@ +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 }}