File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ jobs:
182182 if (-not ($minMajorMinor -and $autoIncrement)) {
183183 throw "Missing MinVer settings in Custom.Build.props"
184184 }
185-
185+
186186 # Execute MinVer
187187 echo "MinVerVersion=$(minver --minimum-major-minor $minMajorMinor --auto-increment $autoIncrement)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
188188 - name : Validate build version
@@ -234,7 +234,19 @@ jobs:
234234 - name : Install MinVer CLI
235235 run : dotnet tool install --global minver-cli
236236 - name : Determine versions
237- run : echo "MinVerVersion=$(minver)" >> $GITHUB_ENV
237+ shell : pwsh
238+ run : |
239+ # Read settings from Custom.Build.props
240+ [xml]$xml = Get-Content ./src/Custom.Build.props
241+ $minMajorMinor = $xml.selectNodes('/Project/PropertyGroup/MinVerMinimumMajorMinor').InnerText
242+ $autoIncrement = $xml.selectNodes('/Project/PropertyGroup/MinVerAutoIncrement').InnerText
243+ echo "MinVerMinimumMajorMinor=$minMajorMinor, MinVerAutoIncrement=$autoIncrement"
244+ if (-not ($minMajorMinor -and $autoIncrement)) {
245+ throw "Missing MinVer settings in Custom.Build.props"
246+ }
247+
248+ # Execute MinVer
249+ echo "MinVerVersion=$(minver --minimum-major-minor $minMajorMinor --auto-increment $autoIncrement)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
238250 - name : Validate build version
239251 if : ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
240252 uses : ./.github/actions/validate-version
You can’t perform that action at this time.
0 commit comments