Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit a696f69

Browse files
author
Tommaso Stocchi
authored
Update Publish NuGet.yml
1 parent 01af885 commit a696f69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/Publish NuGet.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Publish Packages
22

33
on:
4-
push:
5-
branches: [ master ]
4+
release:
5+
types: [published]
66

77
jobs:
88
build:
@@ -23,7 +23,7 @@ jobs:
2323
run: dotnet build ./src --configuration Release --no-restore
2424

2525
- name: Pack with dotnet
26-
run: dotnet pack ./src/ServiceLibrary.ConsoleApp/ServiceLibrary.ConsoleApp.csproj --output nuget-packages --configuration Release -p:PackageVersion=2.0.3
26+
run: dotnet pack ./src/ServiceLibrary.ConsoleApp/ServiceLibrary.ConsoleApp.csproj --output nuget-packages --configuration Release -p:PackageVersion=${{ github.event.release.tag_name }}
2727

2828
- name: Push with dotnet
2929
run: dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)