Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Publish cocoapods on GH release only #884

Merged
merged 1 commit into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
18 changes: 18 additions & 0 deletions .github/workflows/cocoapods.yml
Original file line number Diff line number Diff line change
@@ -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