Skip to content

Commit 77e75ff

Browse files
authored
Added support for pushing the NuGet package to the GitHub Package Registry.
1 parent 76d4fbc commit 77e75ff

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
@@ -38,3 +38,16 @@ jobs:
3838
run: |
3939
export REPOSITORY_NAME=$(basename ${{ github.repository }})
4040
bash ./publish-release.sh
41+
42+
pushNuGetToGitHubPackageRegistry:
43+
needs: buildAndDeploy
44+
if: github.event_name == 'push'
45+
runs-on: windows-latest
46+
steps:
47+
- uses: actions/checkout@v1
48+
- uses: warrenbuckley/Setup-Nuget@v1
49+
- name: Publish to GitHub Package Registry
50+
run: |
51+
dotnet pack -c Release
52+
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/linksplatform/index.json" -UserName linksplatform -Password ${{ secrets.GITHUB_TOKEN }}
53+
nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate

0 commit comments

Comments
 (0)