diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0e2cb1c0d..df81ef3f0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,6 @@ on: pull_request: branches: ["main"] -permissions: - contents: write - jobs: build-and-publish: runs-on: windows-latest diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61bda831b9..a11022d466 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,6 +51,7 @@ jobs: - name: Build env: VERSION: ${{ env.fullSemVer }} + FILE_VERSION: ${{ env.assemblySemFileVer }} run: ./build.ps1 build - name: Pack diff --git a/Build/Program.cs b/Build/Program.cs index bd78720c24..52f7347f71 100644 --- a/Build/Program.cs +++ b/Build/Program.cs @@ -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" ); } );