File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ # Workflow for test, build and publish to NuGet.
2+ name : Build
3+
4+ on :
5+ push :
6+ branches : [ master, develop ]
7+ pull_request :
8+ branches : [ master, develop ]
9+
10+ jobs :
11+ build :
12+ runs-on : windows-latest
13+
14+ env :
15+ solution : DIV2.Format.Exporter.sln
16+ test_project : DIV2.Format.Exporter.Tests\DIV2.Format.Exporter.Tests.csproj
17+
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v2
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Install .NET Core
25+ uses : actions/setup-dotnet@v1
26+ with :
27+ dotnet-version : 3.1.x
28+
29+ - name : Install NuGet
30+ uses : NuGet/setup-nuget@v1
31+
32+ - name : Execute unit tests
33+ run : dotnet test $env:test_project
34+
35+ - name : Build project
36+ run : dotnet build $env:solution --configuration Release
37+
38+ - if : (github.ref == 'refs/heads/master') # Only publish to NuGet from master branch.
39+ name : Publish NuGet package (package is generated during the project build process)
40+ run : dotnet nuget push "DIV2.Format.Exporter\bin\x64\Release\*.nupkg" --api-key ${{ secrets.NUGET_SECRET_KEY }} --source "https://api.nuget.org/v3/index.json" --skip-duplicate --no-symbols true
You can’t perform that action at this time.
0 commit comments