Closed Simply007 closed 1 year ago
I have created a test environment that will build the solution and store nuget packages in the github action build artifacts using testing github action.
Alright, so the issue is cased by dotnet test --no-build --verbosity normal --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
command. Before this, all version are correctly set. dotnet test
does change File version!
Not sure why, and how to fix that though.
It might be caused by restore
step - it might worth trying to disable it https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#implicit-restore
Alright, so the issue is cased by
dotnet test --no-build --verbosity normal --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
command. Before this, all version are correctly set.dotnet test
does change File version!Not sure why, and how to fix that though.
I have tried quoted scenario with one exception - the projects are targeting .net6
(not netstandard2.0
) - the issue didn't occur.
Brief bug description
Current Github action release process does not set the file version of the DLLs correctly it is being set to v
1.0.0
Specifically:
On the other hand, these packages are correctly set:
Repro steps
Release a beta version according to the https://github.com/Kentico/Home/wiki/Release-&-version-management-of-.NET-projects and check the file version of the output DLLs on GithUb as well as on GitHub.
Example for delivery package could be seen here: https://github.com/Kentico/Home/wiki/Release-&-version-management-of-.NET-projects
Expected behavior
All DLLs in the nuget packages have the correct version.
Additional context
discovered during #285
It might be caused by the AssemblyInfo clash. There is already
~/Properties/AssemblyInfo.cs
andGenerateAssemblyInfo
being set to true on*.csproj
files.Running the same commands defined in
release.yml
locally on windows machine using PowerShell (mentioned because of argument format) leads to correctly set File version for the DLLs - this approach was used for version 15.0.1-beta7.The best way to test the release process would be to create a separate branch from master, to duplicate the
release.yml
action, hook it to every commit to the newly created branch and remove publishing to nuget and leave only storing artifacts in GitHub action build. Then try different configurations until all versions are properly set.Once fixed, make the same fix in: