Skip to content

Commit 7e0457c

Browse files
committed
Publish pre-releases on GitHub and releases on NuGet
1 parent 57232a6 commit 7e0457c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ jobs:
2525
- run: dotnet build --verbosity normal
2626
- run: dotnet test --no-build --verbosity normal
2727
- run: dotnet pack --no-build --verbosity normal
28-
publish:
28+
publish-release:
2929
runs-on: macos-latest
3030
needs: test
31-
if: github.ref == 'refs/heads/deploy' || startsWith(github.ref, 'refs/tags')
32-
name: Publish NuGet package
31+
if: startsWith(github.ref, 'refs/tags')
32+
name: Publish package on nuget.org
3333
steps:
3434
- run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
35+
publish-prerelease:
36+
runs-on: macos-latest
37+
needs: test
38+
if: github.ref == 'refs/heads/deploy'
39+
name: Publish package on github.com
40+
steps:
41+
- run: dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
42+
- run: dotnet nuget push "**/*.nupkg" --source github

0 commit comments

Comments
 (0)