Skip to content

Commit 340f380

Browse files
authored
Update nuget-pack-push.yml
1 parent 4a2136a commit 340f380

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: CD
22
on:
3-
push:
4-
tags:
5-
- '*'
3+
release:
4+
types:
5+
- published
6+
#- created
7+
#- edited
8+
#- deleted
9+
#- prereleased
10+
611
jobs:
712
build:
813
name: Push ${{ github.ref }} to NUGET
@@ -14,8 +19,8 @@ jobs:
1419
dotnet-version: '3.1.100'
1520
- name: Get the version
1621
id: get_version
17-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
22+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
1823
- run: dotnet build -c Release -p:version=${{ steps.get_version.outputs.VERSION }} /nowarn:CS1591
19-
- run: dotnet test -c Release -p:version=${{ steps.get_version.outputs.VERSION }} /nowarn:CS1591
20-
- run: dotnet pack src/ -c Release -o ${GITHUB_WORKSPACE} -p:version=${{ steps.get_version.outputs.VERSION }} /nowarn:CS1591
21-
- run: dotnet nuget push ${GITHUB_WORKSPACE}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
24+
#- run: dotnet test -c Release -p:version=${{ steps.get_version.outputs.VERSION }} /nowarn:CS1591
25+
#- run: dotnet pack src/ -c Release -o ${GITHUB_WORKSPACE} -p:version=${{ steps.get_version.outputs.VERSION }} /nowarn:CS1591
26+
#- run: dotnet nuget push ${GITHUB_WORKSPACE}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)