From ff73004c015032bebc1f30cda7dc2435fc811d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=E1=BA=A1m=20H=E1=BB=93ng=20Ph=C3=BAc?= Date: Sat, 1 Jun 2024 01:10:50 +0700 Subject: [PATCH] Update deploy-nuget-packages.yml --- .github/workflows/deploy-nuget-packages.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-nuget-packages.yml b/.github/workflows/deploy-nuget-packages.yml index 78a4be2..0345cb5 100644 --- a/.github/workflows/deploy-nuget-packages.yml +++ b/.github/workflows/deploy-nuget-packages.yml @@ -27,7 +27,7 @@ jobs: - name: Determine affected projects id: dotnet_affected run: | - dotnet new tool-manifest && dotnet tool install dotnet-affected && touch affected.txt + dotnet new tool-manifest && dotnet tool install dotnet-affected if dotnet affected -f text traversal \ --from "${{ steps.setSHAs.outputs.base }}" \ @@ -51,3 +51,11 @@ jobs: - name: Test affected projects if: steps.dotnet_affected.outputs.has_output == 'true' run: dotnet test affected.proj + + - name: Pack affected projects + if: steps.dotnet_affected.outputs.has_output == 'true' + run: dotnet pack affected.proj + + - name: Push NuGet packages + if: steps.dotnet_affected.outputs.has_output == 'true' + run: dotnet nuget push **/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json