From 4e84e433a1ff72c48ff234f1feaedf15825f9a05 Mon Sep 17 00:00:00 2001 From: Artur Guseinov Date: Tue, 30 May 2023 18:52:51 +0300 Subject: [PATCH] Publish on GH release only --- .github/workflows/cd.yml | 14 ++------------ .github/workflows/cocoapods.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/cocoapods.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index fce27c131..bb5ce36ae 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -3,8 +3,6 @@ # it takes pull request name # and automatically commit it as a package version # pull request name should always be a version of a new release -# -# After version bump publishing Cocoapods release name: cd @@ -13,29 +11,21 @@ on: branches: [ main ] env: PACKAGE_VERSION: ${{ github.event.pull_request.title }} - jobs: set-user-agent: runs-on: macos-latest steps: - uses: actions/checkout@v2 with: - fetch-depth: 0 token: ${{ secrets.GH_TOKEN }} - name: Set User Agent shell: bash run: ./.github/scripts/set-user-agent.sh - - uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Set User Agent - tagging_message: ${{ github.event.pull_request.title }} - skip_checkout: true - - name: Publish to CocoaPod register - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + - name: Lint CocoaPods run: | - pod trunk push WalletConnectSwiftV2.podspec --verbose --allow-warnings - + pod lib lint WalletConnectSwiftV2.podspec --verbose --allow-warnings \ No newline at end of file diff --git a/.github/workflows/cocoapods.yml b/.github/workflows/cocoapods.yml new file mode 100644 index 000000000..77e3aed3e --- /dev/null +++ b/.github/workflows/cocoapods.yml @@ -0,0 +1,18 @@ +name: cocoapods + +on: + release: + types: [ published ] +jobs: + set-user-agent: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_TOKEN }} + + - name: Publish to CocoaPod register + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + run: | + pod trunk push WalletConnectSwiftV2.podspec --verbose --allow-warnings \ No newline at end of file