Skip to content

Commit

Permalink
Nuget process fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmclaws committed Mar 27, 2024
1 parent 4b0e45d commit 1e578d2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/nuget-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Push to NuGet

on:
workflow_dispatch:
workflow_run:
workflows: ["CI Build & Package", "Release Build & Package"]
types:
Expand All @@ -10,16 +11,25 @@ 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
with:
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
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.'

0 comments on commit 1e578d2

Please sign in to comment.