From dae028c8a0cbe73cd1864be2016f1e6b058e2fa7 Mon Sep 17 00:00:00 2001 From: Roman Gardukevich Date: Mon, 8 Apr 2024 14:16:24 +0300 Subject: [PATCH 1/2] Deploy to Cocoapods (powered by GHA) --- .github/workflows/deploy_cocoapods.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/deploy_cocoapods.yml diff --git a/.github/workflows/deploy_cocoapods.yml b/.github/workflows/deploy_cocoapods.yml new file mode 100644 index 0000000..82b459d --- /dev/null +++ b/.github/workflows/deploy_cocoapods.yml @@ -0,0 +1,22 @@ +name: Deploy to CocoaPods + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Configure .netrc + run: | + echo "machine api.mapbox.com login mapbox password ${{ secrets.SDK_REGISTRY_TOKEN }}" >> ~/.netrc + chmod 0600 ~/.netrc + + - name: Deploy to Cocoapods + run: pod trunk push + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} From 96bc6a23720f9914462e3cd2472ab5aff4b3d61c Mon Sep 17 00:00:00 2001 From: Roman Gardukevich Date: Mon, 8 Apr 2024 14:16:39 +0300 Subject: [PATCH 2/2] Migrate CircleCI basic config to the GHA --- .circleci/config.yml | 38 -------------------------- .github/workflows/build.yml | 20 ++++++++++++++ .github/workflows/deploy_cocoapods.yml | 2 +- 3 files changed, 21 insertions(+), 39 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 676ac8d..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference -# For a detailed guide to building and testing on iOS, read the docs: -# https://circleci.com/docs/2.0/testing-ios/ -version: 2.1 - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - build: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - macos: - xcode: 14.3.1 # Specify the Xcode version to use - - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - - checkout - - run: - name: Configure .netrc - command: | - echo "machine api.mapbox.com login mapbox password $SDK_REGISTRY_TOKEN" >> ~/.netrc - chmod 0600 ~/.netrc - - run: - name: Check SPM manifest - command: swift package resolve - - run: - name: Check CocoaPods manifest - command: pod spec lint - -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows -workflows: - sample: # This is the name of the workflow, feel free to change it to better match your workflow. - # Inside the workflow, you define the jobs you want to run. - jobs: - - build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6013989 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build + +on: push + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Configure .netrc + run: | + echo "machine api.mapbox.com login mapbox password ${{ secrets.SDK_REGISTRY_TOKEN }}" >> ~/.netrc + chmod 0600 ~/.netrc + + - name: Check SPM manifest + run: swift package resolve + + - name: Check CocoaPods manifest + run: pod spec lint diff --git a/.github/workflows/deploy_cocoapods.yml b/.github/workflows/deploy_cocoapods.yml index 82b459d..486ced3 100644 --- a/.github/workflows/deploy_cocoapods.yml +++ b/.github/workflows/deploy_cocoapods.yml @@ -6,7 +6,7 @@ on: - '*' jobs: - build: + deploy-to-cocoapods: runs-on: macos-latest steps: - uses: actions/checkout@v4