diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index c547286..437c3e1 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -15,17 +15,15 @@ inputs: runs: using: "composite" steps: - # Package buildss - name: Run tests if: inputs.type == 'unit-tests' shell: bash - run: dotnet test --verbosity normal --filter Category=unit + run: dotnet test --verbosity minimal --filter Category=unit - # Integration tests - name: Run integration tests if: inputs.type == 'integration-tests' shell: bash env: RELAY_ENDPOINT: ${{ inputs.relay-endpoint }} PROJECT_ID: ${{ inputs.project-id }} - run: dotnet test --verbosity normal --filter Category=integration + run: dotnet test --verbosity minimal --filter Category=integration diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a55f2f6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: .NET Build & Test + +on: + push: + branches: [ main, '2.0' ] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 8.0.x + + - name: Restore dependencies + run: dotnet restore + working-directory: ./ + + - name: Build + run: dotnet build --no-restore + working-directory: ./ + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build-artifacts + path: | + **/bin/**/*.dll + !**/Core Modules/**/bin/**/*.dll + !**/Tests/**/bin/**/*.dll + + test: + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + test-type: [unit-tests, integration-tests] + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 8.0.x + + - name: Run tests + uses: ./.github/actions/ci + with: + type: ${{ matrix.test-type }} + project-id: ${{ secrets.PROJECT_ID }} \ No newline at end of file diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml deleted file mode 100644 index ea27745..0000000 --- a/.github/workflows/dotnet_build.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: .NET Build & Test - -on: - push: - branches: [ main, 2.0 ] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - test-type: [unit-tests, integration-tests] - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: | - 3.1.x - 6.0.x - - name: Restore dependencies - run: dotnet restore - working-directory: ./ - - name: Build - run: dotnet build --no-restore - working-directory: ./ - - uses: ./.github/actions/ci - with: - type: ${{ matrix.test-type }} - project-id: ${{ secrets.PROJECT_ID }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index 45d2ae4..0000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: PR Build - -on: - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - test-type: [ unit-tests, integration-tests ] - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: | - 3.1.x - 6.0.x - - name: Restore dependencies - run: dotnet restore - working-directory: ./ - - name: Build - run: dotnet build --no-restore - working-directory: ./ - - uses: ./.github/actions/ci - with: - type: ${{ matrix.test-type }} - project-id: ${{ secrets.PROJECT_ID }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b02567..c77ead1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,29 +1,68 @@ -name: Release to NuGet +name: Release on: + workflow_dispatch: release: types: [published] - + jobs: build: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: | - 3.1.x - 6.0.x - - name: Build - run: dotnet build -c Release - - uses: ./.github/actions/ci - with: - type: 'unit-tests' - project-id: ${{ secrets.PROJECT_ID }} - - name: Pack nugets - run: dotnet pack -c Release --no-build --output . - - name: Push to NuGet - run: dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 8.0.x + + - name: Run tests + uses: ./.github/actions/ci + with: + type: 'unit-tests' + project-id: ${{ secrets.PROJECT_ID }} + + - name: Build Release + run: dotnet build -c Release + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build-artifacts + path: | + **/bin/**/*.dll + !**/Tests/**/bin/**/*.dll + + pack: + needs: build + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + +# - name: Setup .NET +# uses: actions/setup-dotnet@v3 +# with: +# dotnet-version: | +# 8.0.x +# +# - name: Pack nugets +# run: dotnet pack -c Release --no-build --output . +# +# - name: Push to NuGet +# run: dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json + + dispatch: + needs: pack + runs-on: ubuntu-latest + steps: + - name: Trigger workflow in WalletConnectUnity + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.REPOSITORY_DISPATCH_PAT }} + repository: walletconnect/walletconnectunity + event-type: new-release \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index fbcf5de..8b613ed 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,8 @@ 2.1.6 - net6.0;netcoreapp3.1;netstandard2.1; + net6.0;net7.0;net8.0;netstandard2.1; + true latest diff --git a/Tests/WalletConnectSharp.Auth.Tests/WalletConnectSharp.Auth.Tests.csproj b/Tests/WalletConnectSharp.Auth.Tests/WalletConnectSharp.Auth.Tests.csproj index 782a000..9f3749c 100644 --- a/Tests/WalletConnectSharp.Auth.Tests/WalletConnectSharp.Auth.Tests.csproj +++ b/Tests/WalletConnectSharp.Auth.Tests/WalletConnectSharp.Auth.Tests.csproj @@ -1,28 +1,28 @@ - - net6.0;netcoreapp3.1 - 2.0.0 - 2.0.0 - 2.0.0 - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - - - - + + + + diff --git a/Tests/WalletConnectSharp.Crypto.Tests/WalletConnectSharp.Crypto.Tests.csproj b/Tests/WalletConnectSharp.Crypto.Tests/WalletConnectSharp.Crypto.Tests.csproj index bfe7d0e..ae51b03 100644 --- a/Tests/WalletConnectSharp.Crypto.Tests/WalletConnectSharp.Crypto.Tests.csproj +++ b/Tests/WalletConnectSharp.Crypto.Tests/WalletConnectSharp.Crypto.Tests.csproj @@ -1,28 +1,28 @@ - - net6.0;netcoreapp3.1 - 2.0.0 - 2.0.0 - 2.0.0 - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - - - - + + + + diff --git a/Tests/WalletConnectSharp.Examples/WalletConnectSharp.Examples.csproj b/Tests/WalletConnectSharp.Examples/WalletConnectSharp.Examples.csproj index 264dcc0..441d40b 100644 --- a/Tests/WalletConnectSharp.Examples/WalletConnectSharp.Examples.csproj +++ b/Tests/WalletConnectSharp.Examples/WalletConnectSharp.Examples.csproj @@ -1,25 +1,25 @@ - - net6.0;netcoreapp3.1;netcoreapp3.1 - 2.0.0 - 2.0.0 - 2.0.0 - Exe - false - WalletConnect.Examples - WalletConnectSharp.Examples - pedrouid, gigajuwels, edkek - A port of the TypeScript SDK to C#. A complete implementation of the WalletConnect v2 protocol that can be used to connect to external wallets or connect a wallet to an external Dapp - Copyright (c) WalletConnect 2023 - https://walletconnect.org/ - https://github.com/WalletConnect/WalletConnectSharp - git - walletconnect wallet web3 ether ethereum blockchain evm - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + Exe + false + WalletConnect.Examples + WalletConnectSharp.Examples + pedrouid, gigajuwels, edkek + A port of the TypeScript SDK to C#. A complete implementation of the WalletConnect v2 protocol that can be used to connect to external wallets or connect a wallet to an external Dapp + Copyright (c) WalletConnect 2023 + https://walletconnect.org/ + https://github.com/WalletConnect/WalletConnectSharp + git + walletconnect wallet web3 ether ethereum blockchain evm + - - - + + + diff --git a/Tests/WalletConnectSharp.Network.Tests/WalletConnectSharp.Network.Tests.csproj b/Tests/WalletConnectSharp.Network.Tests/WalletConnectSharp.Network.Tests.csproj index 82acc30..8c72a4b 100644 --- a/Tests/WalletConnectSharp.Network.Tests/WalletConnectSharp.Network.Tests.csproj +++ b/Tests/WalletConnectSharp.Network.Tests/WalletConnectSharp.Network.Tests.csproj @@ -1,30 +1,30 @@ - - net6.0;netcoreapp3.1 - 2.0.0 - 2.0.0 - 2.0.0 - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - - - - - - + + + + + + diff --git a/Tests/WalletConnectSharp.Sign.Test/WalletConnectSharp.Sign.Test.csproj b/Tests/WalletConnectSharp.Sign.Test/WalletConnectSharp.Sign.Test.csproj index 488bd90..eefa15c 100644 --- a/Tests/WalletConnectSharp.Sign.Test/WalletConnectSharp.Sign.Test.csproj +++ b/Tests/WalletConnectSharp.Sign.Test/WalletConnectSharp.Sign.Test.csproj @@ -1,29 +1,29 @@ - - net6.0;netcoreapp3.1 - 2.0.0 - 2.0.0 - 2.0.0 - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - - - - - + + + + + diff --git a/Tests/WalletConnectSharp.Storage.Test/WalletConnectSharp.Storage.Test.csproj b/Tests/WalletConnectSharp.Storage.Test/WalletConnectSharp.Storage.Test.csproj index a6497f1..be8fbda 100644 --- a/Tests/WalletConnectSharp.Storage.Test/WalletConnectSharp.Storage.Test.csproj +++ b/Tests/WalletConnectSharp.Storage.Test/WalletConnectSharp.Storage.Test.csproj @@ -1,28 +1,28 @@ - + - false + false - net6.0;netcoreapp3.1 + net8.0 - 2.0.0 + 2.0.0 - 2.0.0 + 2.0.0 - 2.0.0 - + 2.0.0 + - - - - - - + + + + + + - - - - + + + + diff --git a/Tests/WalletConnectSharp.Tests.Common/WalletConnectSharp.Tests.Common.csproj b/Tests/WalletConnectSharp.Tests.Common/WalletConnectSharp.Tests.Common.csproj index eee131d..a74a7d3 100644 --- a/Tests/WalletConnectSharp.Tests.Common/WalletConnectSharp.Tests.Common.csproj +++ b/Tests/WalletConnectSharp.Tests.Common/WalletConnectSharp.Tests.Common.csproj @@ -1,20 +1,20 @@ - - net6.0;netcoreapp3.1;netstandard2.1 - 2.0.0 - 2.0.0 - 2.0.0 - false - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + false + - - - - + + + + - - - + + + diff --git a/Tests/WalletConnectSharp.Web3Wallet.Tests/WalletConnectSharp.Web3Wallet.Tests.csproj b/Tests/WalletConnectSharp.Web3Wallet.Tests/WalletConnectSharp.Web3Wallet.Tests.csproj index dbf1d2d..ed02976 100644 --- a/Tests/WalletConnectSharp.Web3Wallet.Tests/WalletConnectSharp.Web3Wallet.Tests.csproj +++ b/Tests/WalletConnectSharp.Web3Wallet.Tests/WalletConnectSharp.Web3Wallet.Tests.csproj @@ -1,29 +1,29 @@ - - net6.0;netcoreapp3.1 - 2.0.0 - 2.0.0 - 2.0.0 - + + net8.0 + 2.0.0 + 2.0.0 + 2.0.0 + - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + - - - - + + + + diff --git a/global.json b/global.json index 9e5e1fd..1e05653 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "6.0.0", + "version": "8.0.100", "rollForward": "latestMajor", - "allowPrerelease": true + "allowPrerelease": false } -} \ No newline at end of file +}