From 0b6791bbcebfd3f37718cd39d02e110cc856117b Mon Sep 17 00:00:00 2001 From: Ruben Buniatyan Date: Fri, 17 Mar 2023 16:59:32 +0100 Subject: [PATCH] Revise NuGet packaging (#221) --- .github/workflows/csharp-tests.yml | 8 +-- .../csharp/Ckzg.Bindings/Ckzg.Bindings.csproj | 71 +++++++++++-------- 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/.github/workflows/csharp-tests.yml b/.github/workflows/csharp-tests.yml index 970df3a..6d66c26 100644 --- a/.github/workflows/csharp-tests.yml +++ b/.github/workflows/csharp-tests.yml @@ -87,14 +87,14 @@ jobs: name: ckzg-library-wrapper-linux-arm64 path: bindings/csharp/Ckzg.Bindings/runtimes/linux-arm64/native - - name: Setup .NET Core SDK + - name: Set up .NET uses: actions/setup-dotnet@v3 - name: Install dependencies run: cd bindings/csharp && dotnet restore - name: Test - run: cd bindings/csharp && dotnet test --configuration Release --no-restore + run: cd bindings/csharp && dotnet test -c release --no-restore - name: Build - run: cd bindings/csharp && dotnet pack -p:Version=${{ inputs.version || env.binding_build_number_based_version }} --configuration Release --no-restore --output nupkgs + run: cd bindings/csharp && dotnet pack -c release --no-restore -o nupkgs -p:Version=${{ inputs.version || env.binding_build_number_based_version }} -p:ContinuousIntegrationBuild=true - name: Upload package uses: actions/upload-artifact@v3 with: @@ -102,4 +102,4 @@ jobs: path: bindings/csharp/nupkgs/Ckzg.Bindings.*.nupkg - name: Publish package if: github.ref == 'refs/heads/main' - run: dotnet nuget push bindings/csharp/nupkgs/Ckzg.Bindings.*.nupkg --api-key ${{ secrets.CSHARP_NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json + run: dotnet nuget push bindings/csharp/nupkgs/*.nupkg -k ${{ secrets.CSHARP_NUGET_APIKEY }} -s https://api.nuget.org/v3/index.json diff --git a/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj b/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj index e563055..a0d899c 100644 --- a/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj +++ b/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj @@ -1,35 +1,48 @@ - - True - True - enable - preview - enable - Library - LICENSE - https://github.com/ethereum/c-kzg-4844/tree/main/bindings/csharp - README.md - c-kzg eip-4844 - git - https://github.com/ethereum/c-kzg-4844 - Ckzg - net6.0 - Ckzg.Bindings - 0.1.0.0 - + + True + enable + latest + enable + Library + Ckzg + net6.0 + - - - - + + Ethereum Foundation + Ethereum Foundation + The C# bindings for the Polynomial Commitments API library for EIP-4844 + true + true + Ckzg.Bindings + Apache-2.0 + README.md + c-kzg eip-4844 + git + https://github.com/ethereum/c-kzg-4844 + snupkg + 0.1.0.0 + - - - - - - - + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + +