From 77e75ff3dbcec55f141990f8d36f8edb565b96e5 Mon Sep 17 00:00:00 2001 From: Konstantin Dyachenko Date: Tue, 22 Oct 2019 13:50:10 +0300 Subject: [PATCH] Added support for pushing the NuGet package to the GitHub Package Registry. --- .github/workflows/CD.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 9cd783d..59845b7 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -38,3 +38,16 @@ jobs: run: | export REPOSITORY_NAME=$(basename ${{ github.repository }}) bash ./publish-release.sh + + pushNuGetToGitHubPackageRegistry: + needs: buildAndDeploy + if: github.event_name == 'push' + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - uses: warrenbuckley/Setup-Nuget@v1 + - name: Publish to GitHub Package Registry + run: | + dotnet pack -c Release + nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }} + nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate