Skip to content

Commit 40eb560

Browse files
committed
ensured the final version is included in build.
1 parent 502f524 commit 40eb560

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build
5656
run: dotnet build --no-restore
5757
- name: Publish
58-
run: dotnet publish -c Release -r ${{matrix.target}} -o ${{github.workspace}}/publish/${{matrix.target}}
58+
run: dotnet publish -c Release -r ${{matrix.target}} -o ${{github.workspace}}/publish/${{matrix.target}} -p:Version=${{inputs.version}}
5959
- name: Compress (Ubuntu)
6060
if: startsWith(matrix.os, 'ubuntu')
6161
run: |

src/LineCount.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net9.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
<Version Condition="'$(Version)' == ''">0.0.0</Version>
8+
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
79
<Nullable>enable</Nullable>
810
<PublishAot>true</PublishAot>
911
<InvariantGlobalization>true</InvariantGlobalization>

0 commit comments

Comments
 (0)