From 1e578d2d2ce2a84350d3bce82ac7b736d236541c Mon Sep 17 00:00:00 2001 From: Robert McLaws <1657085+robertmclaws@users.noreply.github.com> Date: Wed, 27 Mar 2024 01:52:05 -0400 Subject: [PATCH] Nuget process fixes. --- .github/workflows/nuget-deploy.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nuget-deploy.yml b/.github/workflows/nuget-deploy.yml index f04b09d7..5aafbb89 100644 --- a/.github/workflows/nuget-deploy.yml +++ b/.github/workflows/nuget-deploy.yml @@ -1,6 +1,7 @@ name: Push to NuGet on: + workflow_dispatch: workflow_run: workflows: ["CI Build & Package", "Release Build & Package"] types: @@ -10,11 +11,12 @@ jobs: deployment: runs-on: windows-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Download Artifacts uses: actions/download-artifact@v4 - with: - name: nuget-packages - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -22,4 +24,12 @@ jobs: dotnet-version: 8.x - name: Push to NuGet - run: dotnet nuget push ./nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json \ No newline at end of file + run: dotnet nuget push ./nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json + + on-failure: + runs-on: windows-latest + + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + + steps: + - run: echo 'The triggering workflow failed. Publishing NuGet packages not required.' \ No newline at end of file