Skip to content

Commit 27799a4

Browse files
author
Yavuz Tor
committed
Changed build to publish on github release
1 parent 4ac9eac commit 27799a4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8+
release:
9+
types: [ created ]
810

911
jobs:
1012
build:
@@ -17,16 +19,23 @@ jobs:
1719
uses: actions/setup-dotnet@v1
1820
with:
1921
dotnet-version: 2.1.500
22+
2023
- name: Prepare signing key
24+
if: github.event_name != 'release'
2125
env:
2226
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
2327
run: echo $SIGNING_KEY | base64 -d -i> ../signingKey.snk
28+
2429
- name: Dotnet build
30+
if: github.event_name != 'release'
2531
run: dotnet build -c Debug
32+
2633
- name: Dotnet test
34+
if: github.event_name != 'release'
2735
run: dotnet test --no-build -c Debug
36+
2837
- name: Publish package
38+
if: github.event_name == 'release'
2939
env:
3040
NUGET_KEY: ${{ secrets.NUGET_KEY }}
3141
run: ./publish.sh
32-

0 commit comments

Comments
 (0)