Released assets don't have correct version
Closed this issue · 1 comments
FroggieFrog commented
Describe the bug
The binaries in the realeased assets don't have the corresponding version set.
They all have version 1.0.0.0
.
This is also true for the binaries inside the nuget packages.
To Reproduce
- download assets
- check binaries
Expected behavior
All binaries should have the same version as the corresponding release/tag.
Screenshots
Additional context
Possible solutions:
- pass version as parameter to the
dotnet publish
in the release workflow (-p:Version=$env:APP_VERSION
)- the version could be parsed from the tag (e.g. https://github.com/OrchardCMS/OrchardCore/blob/main/.github/workflows/release_ci.yml#L23)
- pass version as parameter to
dotnet pack
e.g.dotnet pack -p:PackageVersion=2.1.0
- use https://github.com/dotnet/Nerdbank.GitVersioning
- maybe use SemVer
Regenhardt commented
I like passing the tag to dotnet publish
. That way the build outputs also have the version set correctly.