Skip to content

Commit

Permalink
Use different version for file version
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed May 15, 2024
1 parent 19fdf9e commit 9cc1d9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
branches: ["main"]

permissions:
contents: write

jobs:
build-and-publish:
runs-on: windows-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Build
env:
VERSION: ${{ env.fullSemVer }}
FILE_VERSION: ${{ env.assemblySemFileVer }}
run: ./build.ps1 build

- name: Pack
Expand Down
5 changes: 3 additions & 2 deletions Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ void RemoveDirectory(string d)
s =>
{
var version = Environment.GetEnvironmentVariable("VERSION");
Console.WriteLine($"Version: {version}");
var fileVersion = Environment.GetEnvironmentVariable("FILE_VERSION");
Console.WriteLine($"Version: {version} & {fileVersion}");
Run(
"msbuild",
$"{s} /p:Configuration=Release /p:IsDesktopBuild=false /p:NuGetRestorePackages=false /p:Version={version} /p:FileVersion={version} -v:m"
$"{s} /p:Configuration=Release /p:IsDesktopBuild=false /p:NuGetRestorePackages=false /p:Version={version} /p:FileVersion={fileVersion} -v:m"
);
}
);
Expand Down

0 comments on commit 9cc1d9e

Please sign in to comment.