File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : .NET Core
1+ name : .NET Core - Build only
22
33on :
4- push :
5- branches : [ main ]
64 pull_request :
75 branches : [ main ]
86
2321 run : dotnet build --configuration Release --no-restore
2422 - name : Test
2523 run : dotnet test --no-restore --verbosity normal
24+ - name : Pack
25+ run : dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release -o .
26+ - uses : actions/upload-artifact@v2
27+ with :
28+ name : nuget-packages
29+ path : |
30+ **/*.nupkg
31+ **/*.snupkg
Original file line number Diff line number Diff line change 1+ name : .NET Core - Build and push
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ build :
9+
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : Setup .NET Core
15+ uses : actions/setup-dotnet@v1
16+ with :
17+ dotnet-version : 3.1.301
18+ - name : Install dependencies
19+ run : dotnet restore
20+ - name : Build
21+ run : dotnet build --configuration Release --no-restore
22+ - name : Test
23+ run : dotnet test --no-restore --verbosity normal
24+ - name : Pack
25+ run : dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release -o .
26+ - uses : actions/upload-artifact@v2
27+ with :
28+ name : nuget-packages
29+ path : |
30+ **/*.nupkg
31+ **/*.snupkg
32+ - name : Publish
33+ env :
34+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
35+ run : dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k "$NUGET_API_KEY" --skip-duplicate -n 1
Original file line number Diff line number Diff line change 1+ * .snupkg
2+
13# # Ignore Visual Studio temporary files, build results, and
24# # files generated by popular Visual Studio add-ons.
35
You can’t perform that action at this time.
0 commit comments