From 8fdadcda3be068f2561bfbf31eb6e2fabfd42e82 Mon Sep 17 00:00:00 2001 From: rodion-m Date: Tue, 18 Apr 2023 06:15:19 +0600 Subject: [PATCH] Update workflows --- .github/workflows/dotnet.yml | 2 +- .github/workflows/publish_to_nuget.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 21125c5..847e689 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,7 +1,7 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: .NET +name: Build and Test on: push: diff --git a/.github/workflows/publish_to_nuget.yml b/.github/workflows/publish_to_nuget.yml index e9e3e10..a2c1da1 100644 --- a/.github/workflows/publish_to_nuget.yml +++ b/.github/workflows/publish_to_nuget.yml @@ -1,4 +1,4 @@ -name: .NET +name: Publish NuGet Package on: release: @@ -26,5 +26,12 @@ jobs: env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} run: dotnet test --no-build --verbosity normal + - name: Publish - run: dotnet nuget push "**\*.nupkg" --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} + run: dotnet pack --no-build --configuration Release --output packages + - name: Push NuGet Packages + run: | + for pkg in packages/*.nupkg; do + echo "Pushing $pkg..." + dotnet nuget push $pkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + done