Skip to content

Commit 905fee0

Browse files
committed
Update build.yml
1 parent 60b5f5e commit 905fee0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,20 @@ jobs:
6060
name: artifacts
6161
path: '${{github.workspace}}/artifacts'
6262

63-
- name: Publish Build Packages
63+
- name: Publish GitHub Packages
6464
if: success() && github.event_name != 'pull_request'
6565
run: dotnet nuget push ./artifacts/*.nupkg --source https://nuget.pkg.github.com/serilog-contrib/index.json --api-key ${GITHUB_TOKEN} --skip-duplicate
6666
env:
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6868

69+
- name: Publish NuGet Packages
70+
if: success() && github.event_name != 'pull_request'
71+
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY} --skip-duplicate
72+
env:
73+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
74+
6975
- name: Create Release
70-
if: success() && startsWith(github.ref, 'refs/heads/master')
76+
if: success() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/master')
7177
run: 'gh release create "${{env.BUILD_VERSION}}" ./artifacts/*.nupkg --title "v${{env.BUILD_VERSION}}"'
7278
env:
7379
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74-
75-
- name: Publish Release Packages
76-
if: success() && startsWith(github.ref, 'refs/heads/master')
77-
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY} --skip-duplicate
78-
env:
79-
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)