diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4f32cb1b4..0c6b80799 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,7 +18,8 @@ jobs: build: runs-on: windows-latest - + env: + FlowVersion: 1.17.2 steps: - uses: actions/checkout@v4 - name: Generate build number @@ -32,7 +33,7 @@ jobs: with: file: | "**/SolutionAssemblyInfo.cs" - version: 1.17.2-build.${{ steps.buildnumber.outputs.build_number }} + version: $FlowVersion-build.${{ steps.buildnumber.outputs.build_number }} - uses: actions/cache@v4 name: Restore Nuget Cache with: @@ -69,7 +70,7 @@ jobs: run: dotnet test --no-build --verbosity normal -c Release - name: Perform post_build tasks shell: pwsh - run: .\Scripts\post_build.ps1 + run: .\Scripts\post_build.ps1 -flowversion "$FlowVersion-build.${{ steps.buildnumber.outputs.build_number }}" - name: Upload Plugin Nupkg uses: actions/upload-artifact@v4 with: diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index ee626a5a4..aa3b73daa 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -1,7 +1,8 @@ param( [string]$config = "Release", [string]$solution = (Join-Path $PSScriptRoot ".." -Resolve), - [string]$channel = "win-x64-prerelease" + [string]$channel = "win-x64-prerelease", + [string]$flowVersion = "" ) Write-Host "Config: $config" Write-Host "Solution: $solution" @@ -9,7 +10,7 @@ Write-Host "Channel: $channel" function Build-Version { - if ( [string]::IsNullOrEmpty($env:flowVersion)) + if ( [string]::IsNullOrEmpty($flowVersion)) { $targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve $v = (Get-Command ${targetPath}).FileVersionInfo.FileVersion