@@ -131,12 +131,12 @@ jobs:
131
131
}
132
132
}
133
133
134
- - name : Get Commit Messages From Last Day
134
+ - name : Get Commit Messages From Last Day and Update the Release
135
135
id : commit_messages
136
136
working-directory : ${{ github.workspace }}
137
137
env :
138
138
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
139
- shell : pwsh
139
+ shell : powershell
140
140
run : |
141
141
Write-Output "Fetching commits from the last 24 hours..."
142
142
@@ -148,19 +148,23 @@ jobs:
148
148
# If no commits are found, cancel the workflow
149
149
if (-not $commits) {
150
150
Write-Output "No relevant commits in the last 24 hours. Cancelling workflow."
151
- exit 0
152
- }
153
-
154
- # Join commits into a newline-separated string
155
- $formattedCommits = $commits -join "`n"
156
- Write-Output "Commits: $formattedCommits`n"
157
151
158
- # Generate release notes
159
- $releaseNotes = "### Changes in the Last 24 Hours`n`n$formattedCommits"
160
-
161
- $ReleaseTag = "nightly"
162
- Write-Output "Updating existing release: $ReleaseTag"
163
- gh release edit $ReleaseTag --notes "$ReleaseNotes"
152
+ $ReleaseTag = "nightly"
153
+ Write-Output "Updating existing release: $ReleaseTag"
154
+ gh release edit $ReleaseTag --notes "### Changes in the Last 24 Hours`n`nNo changes..."
155
+ }
156
+ else {
157
+ # Join commits into a newline-separated string
158
+ $formattedCommits = $commits -join "`n"
159
+ Write-Output "Commits: $formattedCommits`n"
160
+
161
+ # Generate release notes
162
+ $releaseNotes = "### Changes in the Last 24 Hours`n`n$formattedCommits"
163
+
164
+ $ReleaseTag = "nightly"
165
+ Write-Output "Updating existing release : $ReleaseTag"
166
+ gh release edit $ReleaseTag --notes "$ReleaseNotes"
167
+ }
164
168
165
169
166
170
0 commit comments