From 3aab601c08a419fa85b423ecd83d2ff20d4d68b6 Mon Sep 17 00:00:00 2001 From: Pawel Gerr Date: Sun, 10 Jan 2021 20:44:45 +0100 Subject: [PATCH] Added ci step for pushing packages to Nuget.org --- .github/workflows/main.yml | 9 +++++++++ NuGet.config | 17 +++++++++-------- Thinktecture.Runtime.Extensions.sln | 1 + 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 40f78724..db16d2aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,3 +49,12 @@ jobs: path: | out/*.nupkg out/*.snupkg + + - name: push to nuget.org + if: startsWith(github.ref, 'refs/tags/') + run: | + cd out + dotnet nuget push "*.nupkg" -k "$env:API_KEY" + shell: powershell + env: + API_KEY: ${{ secrets.NUGET_ORG_API_KEY }} diff --git a/NuGet.config b/NuGet.config index 5c4e40a0..8b3034b1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,11 +1,12 @@  + - - - - - - - - + + + + + + + + diff --git a/Thinktecture.Runtime.Extensions.sln b/Thinktecture.Runtime.Extensions.sln index 3619e524..cd74b542 100644 --- a/Thinktecture.Runtime.Extensions.sln +++ b/Thinktecture.Runtime.Extensions.sln @@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{21EB22DE-251 .github\workflows\ci.ps1 = .github\workflows\ci.ps1 .github\workflows\main.yml = .github\workflows\main.yml .gitignore = .gitignore + NuGet.config = NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E6F200ED-86D2-4D5C-9D5F-34592908B107}"