File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to NuGet
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+
15
+ - name : Setup .NET
16
+ uses : actions/setup-dotnet@v3
17
+ with :
18
+ dotnet-version : ' 9.0.x'
19
+
20
+ - name : Restore dependencies
21
+ run : dotnet restore
22
+
23
+ - name : Build
24
+ run : dotnet build --configuration Release --no-restore
25
+
26
+ - name : Test
27
+ run : dotnet test --no-restore --verbosity normal
28
+
29
+ - name : Pack
30
+ run : dotnet pack --configuration Release --no-build --output nupkgs
31
+
32
+ - name : Push to NuGet
33
+ run : |
34
+ cd nupkgs
35
+ for f in *.nupkg
36
+ do
37
+ dotnet nuget push $f --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate
38
+ done
You can’t perform that action at this time.
0 commit comments