@@ -15,27 +15,32 @@ jobs:
1515 build_test_and_pack :
1616 runs-on : windows-latest
1717 steps :
18- - uses : actions/checkout@v3
19- with :
20- fetch-depth : 0 # Fetches entire history, so we can analyze commits since last tag
21- - name : Setup .net core
22- uses : actions/setup-dotnet@v3
23- with :
24- dotnet-version : |
25- 3.1.x
26- 6.0.x
27- - name : Restore dependencies
28- run : dotnet restore
29- - name : Build
30- run : dotnet build -c Release --no-restore
31- - name : Tests
32- run : dotnet test -c Release --no-build --verbosity normal
18+ - uses : actions/checkout@v3
19+ with :
20+ fetch-depth : 0 # Fetches entire history, so we can analyze commits since last tag
21+ - name : Setup .net core
22+ uses : actions/setup-dotnet@v3
23+ with :
24+ dotnet-version : |
25+ 3.1.x
26+ 6.0.x
27+ - name : Restore dependencies
28+ run : dotnet restore
29+ - name : Build
30+ run : dotnet build -c Release --no-restore
31+ - name : Tests
32+ run : dotnet test -c Release --no-build --verbosity normal
3333
34- - name : Pack nuget
35- if : ${{ success() }}
36- run : |
37- $NugetVersion = git describe --tags --abbrev=1 | sed 's/-/./'
38- dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NugetVersion
39- - name : Publish NuGet package
40- if : ${{ success() }}
41- run : dotnet nuget push "${{ env.NuGetDirectory }}\*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json
34+ - name : Pack nuget
35+ if : ${{ success() }}
36+ run : |
37+ $NugetVersion = git describe --tags --abbrev=1 | sed 's/-/./'
38+ dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NugetVersion
39+ - name : Publish NuGet package
40+ if : ${{ success() }}
41+ run : dotnet nuget push "${{ env.NuGetDirectory }}\*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json
42+ - name : Upload files to a GitHub release
43+ if : ${{ success() && github.ref_type == 'tag' }}
44+ 45+ with :
46+ file : ${{ env.NuGetDirectory }}\*.nupkg
0 commit comments