Skip to content

Commit 7f6daf8

Browse files
authored
Update test.yml
1 parent 1896978 commit 7f6daf8

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

.github/workflows/test.yml

+18-14
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ jobs:
131131
}
132132
}
133133
134-
- name: Get Commit Messages From Last Day
134+
- name: Get Commit Messages From Last Day and Update the Release
135135
id: commit_messages
136136
working-directory: ${{ github.workspace }}
137137
env:
138138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139-
shell: pwsh
139+
shell: powershell
140140
run: |
141141
Write-Output "Fetching commits from the last 24 hours..."
142142
@@ -148,19 +148,23 @@ jobs:
148148
# If no commits are found, cancel the workflow
149149
if (-not $commits) {
150150
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"
157151
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+
}
164168

165169

166170

0 commit comments

Comments
 (0)