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 and Deploy
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ env :
10+ DOTNET_VERSION : ' 8.0.x'
11+ CONFIGURATION : Release
12+
13+ jobs :
14+ build :
15+ runs-on : windows-latest
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0 # Required for Source Link
22+
23+ - name : Setup .NET
24+ uses : actions/setup-dotnet@v4
25+ with :
26+ dotnet-version : ${{ env.DOTNET_VERSION }}
27+
28+ - name : Restore dependencies
29+ run : dotnet restore
30+
31+ - name : Build
32+ run : dotnet build --configuration ${{ env.CONFIGURATION }} --no-restore
33+
34+ - name : Test
35+ run : dotnet test --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal --filter "TestCategory=AppVeyor"
36+
37+ - name : Pack NuGet packages
38+ run : dotnet pack --configuration ${{ env.CONFIGURATION }} --no-build --output ./artifacts
39+
40+ - name : Upload artifacts
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : nuget-packages
44+ path : ./artifacts/*.nupkg
45+
46+ - name : Upload symbol packages
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : symbol-packages
50+ path : ./artifacts/*.snupkg
51+
52+ - name : Publish to NuGet
53+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
54+ run : dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
55+ env :
56+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
You can’t perform that action at this time.
0 commit comments