1212 SolutionPath : src\SourceGenerator.Foundations.sln
1313 MSBUILDDISABLENODEREUSE : ' 1' # Stops MSBuild from locking MSBuild nuget package
1414jobs :
15+ build :
16+ name : Build | All
17+ runs-on : windows-latest
18+ steps :
19+ - uses : actions/checkout@v3
20+ with :
21+ ref : ${{ github.head_ref }}
22+ - name : Setup .NET
23+ uses : actions/setup-dotnet@v3
24+ with :
25+ dotnet-version : 6.0.x
26+ - name : Build Solution
27+ run : dotnet test src\SourceGenerator.Foundations.sln
28+
29+ test :
30+ name : Test | ${{ matrix.project.name }}
31+ runs-on : windows-latest
32+ needs : build
33+ strategy :
34+ matrix :
35+ project :
36+ - name : SourceGenerator.Foundations.Tests
37+ - name : ConsoleApp.SourceGenerator.Tests
38+ path : Sandbox/
39+ steps :
40+ - uses : actions/checkout@v3
41+ with :
42+ ref : ${{ github.head_ref }}
43+ - name : Setup .NET
44+ uses : actions/setup-dotnet@v3
45+ with :
46+ dotnet-version : 6.0.x
47+ - name : Test | ${{ matrix.project.name }}
48+ run : dotnet test src\${{ matrix.project.path }}${{ matrix.project.name }}\${{ matrix.project.name }}.csproj
49+
1550 publish :
16- name : build, bundle & publish
51+ name : Publish | ${{ matrix.project.name }}
1752 runs-on : windows-latest
53+ needs :
54+ - test
55+ strategy :
56+ matrix :
57+ project :
58+ - name : SourceGenerator.Foundations
59+ - name : SourceGenerator.Foundations.Contracts
1860 steps :
1961 - uses : actions/checkout@v3
2062 with :
@@ -28,17 +70,13 @@ jobs:
2870 run : dotnet tool restore
2971 - name : GitVersion
3072 run : dotnet gitversion /output buildserver
31- # Build Dependencies
32- - name : Build | SourceGenerator.Foundations.MSBuild
33- run : dotnet build src\SourceGenerator.Foundations.MSBuild\SourceGenerator.Foundations.MSBuild.csproj -p:Version=${{env.GitVersion_AssemblySemVer}}
34- # Build Main
35- - name : Build | SourceGenerator.Foundations\SourceGenerator.Foundations
73+ # Build
74+ - name : Build | ${{ matrix.project.name }}
3675 run : dotnet build src\SourceGenerator.Foundations\SourceGenerator.Foundations.csproj -p:Version=${{env.GitVersion_AssemblySemVer}} -p:PackageVersion=${{env.GitVersion_SemVer}}
37- - name : Test | Solution
38- run : dotnet test ${{env.SolutionPath}}
39- - name : Pack | SourceGenerator.Foundations\SourceGenerator.Foundations
40- run : dotnet pack src\SourceGenerator.Foundations\SourceGenerator.Foundations.csproj -p:Version=${{env.GitVersion_AssemblySemVer}} -p:PackageVersion=${{env.GitVersion_FullSemVer}}
41- # -- Release Only --
42- - name : Push NuGet
76+ # Pack
77+ - name : Pack | ${{ matrix.project.name }}
78+ run : dotnet pack src\${{ matrix.project.name }}\${{ matrix.project.name }}.csproj -p:Version=${{env.GitVersion_AssemblySemVer}} -p:PackageVersion=${{env.GitVersion_FullSemVer}}
79+ # Release
80+ - name : Push | ${{ matrix.project.name }}
4381 if : github.event_name == 'release'
44- run : dotnet nuget push ${{env.ProjectDir}} bin\${{env.Configuration}}\*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
82+ run : dotnet nuget push src\ ${{ matrix.project.name }}\ bin\${{env.Configuration}}\*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
0 commit comments