Skip to content

Commit 8d66331

Browse files
authored
Added support for pushing the NuGet package to the GitHub Package Registry.
1 parent b11c35d commit 8d66331

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
@@ -48,3 +48,16 @@ jobs:
4848
export REPOSITORY_NAME=$(basename ${{ github.repository }})
4949
wget "$SCRIPTS_BASE_URL/publish-release.sh"
5050
bash ./publish-release.sh
51+
52+
pushNuGetToGitHubPackageRegistry:
53+
needs: testAndDeploy
54+
if: github.event_name == 'push'
55+
runs-on: windows-latest
56+
steps:
57+
- uses: actions/checkout@v1
58+
- uses: warrenbuckley/Setup-Nuget@v1
59+
- name: Publish to GitHub Package Registry
60+
run: |
61+
dotnet pack -c Release
62+
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }}
63+
nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate

0 commit comments

Comments
 (0)