Skip to content

Commit bab393f

Browse files
committed
check if has changes based on commit from nuspec
1 parent 004d3ce commit bab393f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/actions/has-changes/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,14 @@ runs:
9595
9696
$csProjPath = "$([IO.Path]::Combine(".", "$($SelectedProject)", "$($SelectedProject).csproj"))"
9797
$hasDifferences = HasChanges -CsprojPath $csProjPath -CurrentHash $currentHash -PrevHash $lastReleaseHash
98+
if ($hasDifferences) {
99+
$nuspecPath = "$([IO.Path]::Combine(".", "$($SelectedProject)", "$($SelectedProject).nuspec"))"
100+
[xml]$nuspec = Get-Content $nuspecPath
101+
$hashFromNuspec = $nuspec.package.metadata.repository.commit
102+
if ($hashFromNuspec) {
103+
$hasDifferences = HasChanges -CsprojPath $csProjPath -CurrentHash $currentHash -PrevHash $hashFromNuspec
104+
}
105+
}
106+
98107
"result=$("$($hasDifferences)".ToLowerInvariant())" >> $env:GITHUB_OUTPUT
99108
exit 0

0 commit comments

Comments
 (0)