diff --git a/.github/workflows/set-user-agent.yml b/.github/workflows/cd.yml similarity index 62% rename from .github/workflows/set-user-agent.yml rename to .github/workflows/cd.yml index a08089f8a..c0a66c572 100644 --- a/.github/workflows/set-user-agent.yml +++ b/.github/workflows/cd.yml @@ -3,12 +3,14 @@ # 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: set-user-agent +name: cd on: pull_request: - branches: [ main ] + branches: [ main, develop ] env: PACKAGE_VERSION: ${{ github.event.pull_request.title }} @@ -18,6 +20,7 @@ jobs: steps: - uses: actions/checkout@v2 with: + fetch-depth: 0 token: ${{ secrets.GH_TOKEN }} - name: Set User Agent @@ -27,4 +30,12 @@ jobs: - 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 }} + run: | + pod trunk push WalletConnectSwiftV2.podspec --verbose diff --git a/Sources/WalletConnectIdentity/IdentityImports.swift b/Sources/WalletConnectIdentity/IdentityImports.swift index 23c1738ef..463cb7c23 100644 --- a/Sources/WalletConnectIdentity/IdentityImports.swift +++ b/Sources/WalletConnectIdentity/IdentityImports.swift @@ -1,3 +1,4 @@ #if !CocoaPods @_exported import WalletConnectNetworking +@_exported import WalletConnectJWT #endif diff --git a/Sources/WalletConnectIdentity/IdentityKeyAPI.swift b/Sources/WalletConnectIdentity/IdentityKeyAPI.swift index 1346d40ac..d29da2480 100644 --- a/Sources/WalletConnectIdentity/IdentityKeyAPI.swift +++ b/Sources/WalletConnectIdentity/IdentityKeyAPI.swift @@ -18,7 +18,7 @@ enum IdentityKeyAPI: HTTPService { } } - var method: WalletConnectNetworking.HTTPMethod { + var method: HTTPMethod { switch self { case .registerIdentity, .registerInvite: return .post diff --git a/Sources/WalletConnectRelay/RPC/Methods/Subscription.swift b/Sources/WalletConnectRelay/RPC/Methods/Subscription.swift index 8021370f6..c4e4b1831 100644 --- a/Sources/WalletConnectRelay/RPC/Methods/Subscription.swift +++ b/Sources/WalletConnectRelay/RPC/Methods/Subscription.swift @@ -1,6 +1,4 @@ - import Foundation -import WalletConnectUtils struct Subscription: RelayRPC { diff --git a/WalletConnectSwiftV2.podspec b/WalletConnectSwiftV2.podspec index 51446a7c5..a79bd3039 100644 --- a/WalletConnectSwiftV2.podspec +++ b/WalletConnectSwiftV2.podspec @@ -92,7 +92,24 @@ Pod::Spec.new do |spec| spec.subspec 'WalletConnectChat' do |ss| ss.source_files = 'Sources/Chat/**/*.{h,m,swift}' + ss.dependency 'WalletConnectSwiftV2/WalletConnectSigner' + ss.dependency 'WalletConnectSwiftV2/WalletConnectIdentity' + end + + spec.subspec 'WalletConnectSigner' do |ss| + ss.source_files = 'Sources/WalletConnectSigner/**/*.{h,m,swift}' + ss.dependency 'WalletConnectSwiftV2/WalletConnectNetworking' + end + + spec.subspec 'WalletConnectIdentity' do |ss| + ss.source_files = 'Sources/WalletConnectIdentity/**/*.{h,m,swift}' ss.dependency 'WalletConnectSwiftV2/WalletConnectNetworking' + ss.dependency 'WalletConnectSwiftV2/WalletConnectJWT' + end + + spec.subspec 'WalletConnectJWT' do |ss| + ss.source_files = 'Sources/WalletConnectJWT/**/*.{h,m,swift}' + ss.dependency 'WalletConnectSwiftV2/WalletConnectKMS' end spec.subspec 'WalletConnectNetworking' do |ss| @@ -117,7 +134,7 @@ Pod::Spec.new do |spec| spec.subspec 'WalletConnectRelay' do |ss| ss.source_files = 'Sources/WalletConnectRelay/**/*.{h,m,swift}' - ss.dependency 'WalletConnectSwiftV2/WalletConnectKMS' + ss.dependency 'WalletConnectSwiftV2/WalletConnectJWT' ss.resource_bundles = { 'WalletConnect_WalletConnectRelay' => [ 'Sources/WalletConnectRelay/PackageConfig.json'