File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,7 @@ runs:
169169 -RepoUrl '${{ steps.target.outputs.url }}' `
170170 -OldTag '${{ steps.target.outputs.originalTag }}' `
171171 -NewTag '${{ steps.target.outputs.latestTag }}'
172- Write-host "Prev call result: $? | LASTEXITCODE = $LASTEXITCODE"
173- Write-Host "Changelog length: $("$changelog".Length) characters"
174- Set-PSDebug -Strict -Trace 2
175172 ${{ github.action_path }}/scripts/set-github-env.ps1 TARGET_CHANGELOG $changelog
176- Write-host "Prev call result: $? | LASTEXITCODE = $LASTEXITCODE"
177173
178174 # First we create a PR only if it doesn't exist. We will later overwrite the content with the same action.
179175 - name : Create a PR
Original file line number Diff line number Diff line change 7979
8080 # The first lines are diff metadata, skip them
8181 $fullDiff = $fullDiff -split " `n " | Select-Object - Skip 4
82-
8382 if ([string ]::IsNullOrEmpty($fullDiff )) {
8483 Write-Host " No differences found between $OldTag and $NewTag "
8584 return
@@ -133,12 +132,11 @@ try {
133132 }
134133
135134 Write-Host " Final changelog length: $ ( $changelog.Length ) characters"
136- return $changelog
135+ Write-Output $changelog
137136 }
138137 }
139138
140139 Write-Host " No changelog additions found between $OldTag and $NewTag "
141- return ' '
142140} catch {
143141 Write-Warning " Failed to get changelog: $ ( $_.Exception.Message ) "
144142} finally {
@@ -148,3 +146,7 @@ try {
148146 Write-Host ' Cleanup complete.'
149147 }
150148}
149+
150+ # This resets the $LASTEXITCODE set by git diff above.
151+ # Note that this only runs in the successful path.
152+ exit 0
You can’t perform that action at this time.
0 commit comments