Skip to content

Commit 5512e49

Browse files
authored
Added support for pushing the NuGet package to the GitHub Package Registry.
1 parent cc1b8a9 commit 5512e49

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/CD.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,16 @@ jobs:
4747
export REPOSITORY_NAME=$(basename ${{ github.repository }})
4848
wget "$SCRIPTS_BASE_URL/publish-release.sh"
4949
bash ./publish-release.sh
50+
51+
pushNuGetToGitHubPackageRegistry:
52+
needs: buildAndDeploy
53+
if: github.event_name == 'push'
54+
runs-on: windows-latest
55+
steps:
56+
- uses: actions/checkout@v1
57+
- uses: warrenbuckley/Setup-Nuget@v1
58+
- name: Publish to GitHub Package Registry
59+
run: |
60+
dotnet pack -c Release
61+
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }}
62+
nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate

0 commit comments

Comments
 (0)