@@ -50,21 +50,28 @@ jobs:
5050 - name : Determine Version
5151 id : version_step
5252 run : |
53- chown -R $(whoami) $(pwd)
54- dotnet-gitversion /output json
53+ chown -R $(whoami) $(pwd)
54+ dotnet-gitversion /output json > version.json
55+ echo "FULL_SEM_VER=$(grep -oP '"FullSemVer":\s*"\K[^"]+' version.json)" >> $GITHUB_ENV
56+ echo "ASSEMBLY_VERSION=$(grep -oP '"AssemblySemFileVer":\s*"\K[^"]+' version.json)" >> $GITHUB_ENV
5557
5658 - name : Restore dependencies
5759 run : dotnet restore
5860
5961 - name : Build Solution
6062 run : |
61- echo "Version: ${{ steps.version_step.outputs.fullSemVer }}\nAssembley Version: ${{ steps.version_step.outputs.fullSemVer }}"
62- dotnet build --configuration Debug --no-restore
63+ echo "Version: ${{ env.FULL_SEM_VER }}"
64+ echo "Assembly Version: ${{ env.ASSEMBLY_VERSION }}"
65+ dotnet build --configuration Debug --no-restore
6366
64- - name : Test
67+ - name : Test .NET48
6568 run : |
6669 dotnet --info
67- mono ~/.nuget/packages/xunit.runner.console/2.9.3/tools/net472/xunit.console.exe ${{github.workspace}}/tests/SwiftCollections.Tests/bin/Debug/net48/SwiftCollections.Tests.dll
70+ mono ~/.nuget/packages/xunit.runner.console/2.9.3/tools/net48/xunit.console.exe ${{github.workspace}}/tests/SwiftCollections.Tests/bin/Debug/net48/SwiftCollections.Tests.dll
71+
72+ - name : Test .NET8
73+ run : |
74+ dotnet test -f net8 --verbosity normal
6875
6976 build-and-test-windows :
7077 if : |
@@ -99,18 +106,22 @@ jobs:
99106
100107 - name : Determine Version
101108 run : |
102- chown -R $(whoami) $(pwd)
103- dotnet-gitversion /output json
109+ chown -R $env:USERNAME $(Get-Location)
110+ dotnet-gitversion /output json | Out-File -FilePath version.json
111+ $json = Get-Content version.json | ConvertFrom-Json
112+ echo "FULL_SEM_VER=$($json.FullSemVer)" | Out-File -FilePath $env:GITHUB_ENV -Append
113+ echo "ASSEMBLY_VERSION=$($json.AssemblySemFileVer)" | Out-File -FilePath $env:GITHUB_ENV -Append
104114
105115 - name : Restore dependencies
106116 run : dotnet restore
107117
108118 - name : Build Solution
109119 run : |
110- echo "Version:${{ env.GitVersion_FullSemVer }}\nAssembley Version:${{env.GitVersion_AssemblySemFileVer }}"
111- dotnet build --configuration Release --no-restore
120+ echo "Version: ${{ env.FULL_SEM_VER }}"
121+ echo "Assembly Version: ${{ env.ASSEMBLY_VERSION }}"
122+ dotnet build --configuration Debug --no-restore
112123
113- - name : Test
124+ - name : Test .NET48 & .NET8
114125 run : |
115126 dotnet --info
116- dotnet test ${{github.workspace}}\tests\SwiftCollections.Tests\bin\Release\net48\SwiftCollections.Tests.dll --verbosity normal
127+ dotnet test --verbosity normal
0 commit comments