Skip to content

Commit 49db4af

Browse files
committed
Update build.yml
1 parent 534e319 commit 49db4af

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/build.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,30 @@ jobs:
6666
name: packages
6767
path: '${{env.BUILD_PATH}}'
6868

69+
deploy:
70+
runs-on: ubuntu-latest
71+
needs: build
72+
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v'))
73+
74+
steps:
75+
- name: Download Artifact
76+
uses: actions/download-artifact@v3
77+
with:
78+
name: packages
79+
80+
- name: Publish Packages GitHub
81+
run: |
82+
for package in $(find -name "*.nupkg"); do
83+
echo "${0##*/}": Pushing $package...
84+
dotnet nuget push $package --source https://nuget.pkg.github.com/serilog-contrib/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
85+
done
86+
6987
- name: Publish Packages Nuget
70-
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v'))
88+
if: startsWith(github.ref, 'refs/tags/v')
7189
run: |
7290
for package in $(find -name "*.nupkg"); do
7391
echo "${0##*/}": Pushing $package...
7492
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
7593
done
7694
95+

0 commit comments

Comments
 (0)