Skip to content

Commit 74a03b6

Browse files
author
Bar Nuri
committed
nuget job
1 parent 7756c92 commit 74a03b6

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

.github/workflows/nugetPackage.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name: Nuget Package
22
on:
3-
# push:
4-
# branches:
5-
# - master
6-
# pull_request:
7-
# types: [closed]
8-
# branches:
9-
# - master
103
release:
114
types: [published]
125

@@ -21,22 +14,10 @@ jobs:
2114
- name: Setup .Net
2215
uses: actions/setup-dotnet@v1
2316

24-
- name: Build & Packing
25-
env:
17+
- name: Nuget Package And Upload
18+
uses: csharp-extensions/publish-nuget@v1
19+
with:
2620
releaseVersion: ${{ github.event.release.tag_name }}
2721
repoUrl: ${{ github.server_url }}/${{ github.repository }}
28-
run: |
29-
echo "pack version $releaseVersion"
30-
dotnet restore
31-
dotnet build -c Release
32-
dotnet pack /p:Version="$releaseVersion" /p:RepositoryUrl="$repoUrl" -c Release -o deploy
33-
34-
- name: Publish Nuget Package
35-
env:
3622
nugetToken: ${{secrets.NUGET_AUTH_TOKEN}}
37-
nugetSource: https://api.nuget.org/v3/index.json
38-
# nugetToken: ${{secrets.GITHUB_TOKEN}}
39-
# nugetSource: https://nuget.pkg.github.com/csharp-extensions/index.json
40-
run: |
41-
ls -l deploy
42-
dotnet nuget push ./deploy/*.nupkg --skip-duplicate --no-symbols true -k $nugetToken --source $nugetSource
23+
nugetSource: https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)