From 160e516dbdc2402e7105697542db3de7cbfbadf5 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 23 Sep 2024 21:34:24 +0100 Subject: [PATCH] add upload to nuget --- .github/workflows/dotnet.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 371a3637..cae2811e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -34,11 +34,14 @@ jobs: with: path: packages -# publish-to-myget: -# runs-on: windows-2022 -# needs: [build] -# steps: -# - uses: actions/download-artifact@v3 -# -# - name: Publish to Myget -# run: dotnet nuget push */*.nupkg -k ${{ secrets.MYGET_TOKEN }} -s https://www.myget.org/F/blazorbindings/api/v2/package + publish-to-nuget: + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/download-artifact@v3 + with: + name: packages + - name: Push to NuGet + run: | + dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file