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 : Build, Test, Publish
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ branches :
9+ - master
10+
11+ defaults :
12+ run :
13+ working-directory : src
14+
15+ jobs :
16+ build-test-publish :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v5
20+ - name : Setup .NET
21+ uses : actions/setup-dotnet@v5
22+ with :
23+ dotnet-version : |
24+ 8.0.x
25+ 9.0.x
26+
27+ - name : Restore dependencies
28+ run : dotnet restore
29+
30+ - name : Build
31+ run : dotnet build -c Release --no-restore
32+
33+ - name : Run Tests
34+ run : dotnet test -c Release --no-restore --no-build -v normal
35+
36+ - name : Pack NuGet Package(s)
37+ run : dotnet pack -c Release --no-restore --no-build --output ~/nuget-packages
38+
39+ - name : Upload Build Artifact(s)
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : nuget-packages
43+ path : ~/nuget-packages
44+
45+ - name : Push NuGet Package(s)
46+ run : |
47+ dotnet nuget push ~/nuget-packages/*.nupkg \
48+ --source https://api.nuget.org/v3/index.json \
49+ --api-key ${{ secrets.NUGET_API_KEY }} \
50+ --skip-duplicate
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments