From ed474e281767ed0dccfd47d2a476b58f4e4e74a5 Mon Sep 17 00:00:00 2001 From: Jamie Hoffmann Date: Thu, 11 Feb 2021 16:17:37 +1100 Subject: [PATCH] Tidy up dotnet.yml - only run on release publish - remove extra commands - publish real SDK --- .github/workflows/dotnet.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4a57f946..26ed96ca 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,11 +1,8 @@ name: .NET on: -# push: -# branches: -# - github-actions-nuget-deploy - workflow_dispatch: - + release: + types: [published] jobs: build: @@ -22,9 +19,7 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal - name: Create Package for Nuget.org\ run: dotnet pack - - name: find out where we are - run: pwd | ls + - name: Publish Package to Nuget.org + run: dotnet nuget push ./Xero.NetStandard.OAuth2/bin/Debug/Xero.NetStandard.OAuth2.${{ github.event.release.name }}.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json