@@ -130,10 +130,19 @@ jobs:
130130 with :
131131 branch : ${{ steps.set-branch-name.outputs.value }}
132132 hard-reset : true
133+ - name : IsVersionBumpEnabled
134+ id : is-version-bump-enabled
135+ shell : pwsh
136+ run : |
137+ $lastVersionTag = (git tag -l "EncryptedConfigValue.Module/*" | Sort-Object { [version]($_ -split '/' | Select-Object -Last 1) } | Select-Object -Last 1) -split '/' | Select-Object -Last 1
138+ $nuspecVersion = (Select-String -Path .\EncryptedConfigValue.Module\EncryptedConfigValue.Module.nuspec -Pattern '<version>(.*?)</version>' | ForEach-Object { $_.Matches.Groups[1].Value })
139+ $newestVersion = @($lastVersionTag, $nuspecVersion) | Sort-Object { [version]($_ -replace "net", "") } -Descending | Select-Object -First 1
140+ "value=$($newestVersion -ne $nuspecVersion)" >> $env:GITHUB_OUTPUT
133141 - uses : ./.github/actions/update-nuspec-file
134142 with :
135143 GITHUB_TOKEN : ${{ secrets.PAT }}
136144 project : ${{ steps.set-project-name.outputs.value }}
145+ is-version-bump-enabled : ${{ steps.is-version-bump-enabled.outputs.value }}
137146 external-dependencies-sources : |
138147 EncryptedConfigValue
139148 additional-files : |
@@ -177,10 +186,19 @@ jobs:
177186 with :
178187 branch : ${{ steps.set-branch-name.outputs.value }}
179188 hard-reset : true
189+ - name : IsVersionBumpEnabled
190+ id : is-version-bump-enabled
191+ shell : pwsh
192+ run : |
193+ $lastVersionTag = (git tag -l "EncryptedConfigValue.AspNetCore/*" | Sort-Object { [version]($_ -split '/' | Select-Object -Last 1) } | Select-Object -Last 1) -split '/' | Select-Object -Last 1
194+ $nuspecVersion = (Select-String -Path .\EncryptedConfigValue.AspNetCore\EncryptedConfigValue.AspNetCore.nuspec -Pattern '<version>(.*?)</version>' | ForEach-Object { $_.Matches.Groups[1].Value })
195+ $newestVersion = @($lastVersionTag, $nuspecVersion) | Sort-Object { [version]($_ -replace "net", "") } -Descending | Select-Object -First 1
196+ "value=$($newestVersion -ne $nuspecVersion)" >> $env:GITHUB_OUTPUT
180197 - uses : ./.github/actions/update-nuspec-file
181198 with :
182199 GITHUB_TOKEN : ${{ secrets.PAT }}
183200 project : ${{ steps.set-project-name.outputs.value }}
201+ is-version-bump-enabled : ${{ steps.is-version-bump-enabled.outputs.value }}
184202 additional-files : |
185203 ./Readme.md
186204 - uses : ./.github/actions/commit-changes
@@ -222,10 +240,19 @@ jobs:
222240 with :
223241 branch : ${{ steps.set-branch-name.outputs.value }}
224242 hard-reset : true
243+ - name : IsVersionBumpEnabled
244+ id : is-version-bump-enabled
245+ shell : pwsh
246+ run : |
247+ $lastVersionTag = (git tag -l "EncryptedConfigValue.Cli/*" | Sort-Object { [version]($_ -split '/' | Select-Object -Last 1) } | Select-Object -Last 1) -split '/' | Select-Object -Last 1
248+ $nuspecVersion = (Select-String -Path .\EncryptedConfigValue.Cli\EncryptedConfigValue.Cli.nuspec -Pattern '<version>(.*?)</version>' | ForEach-Object { $_.Matches.Groups[1].Value })
249+ $newestVersion = @($lastVersionTag, $nuspecVersion) | Sort-Object { [version]($_ -replace "net", "") } -Descending | Select-Object -First 1
250+ "value=$($newestVersion -ne $nuspecVersion)" >> $env:GITHUB_OUTPUT
225251 - uses : ./.github/actions/update-nuspec-file
226252 with :
227253 GITHUB_TOKEN : ${{ secrets.PAT }}
228254 project : ${{ steps.set-project-name.outputs.value }}
255+ is-version-bump-enabled : ${{ steps.is-version-bump-enabled.outputs.value }}
229256 external-dependencies-sources : |
230257 EncryptedConfigValue
231258 additional-files : |
0 commit comments