Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cdozdil authored Jan 21, 2025
1 parent 1896978 commit 7f6daf8
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ jobs:
}
}
- name: Get Commit Messages From Last Day
- name: Get Commit Messages From Last Day and Update the Release
id: commit_messages
working-directory: ${{ github.workspace }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
shell: powershell
run: |
Write-Output "Fetching commits from the last 24 hours..."
Expand All @@ -148,19 +148,23 @@ jobs:
# If no commits are found, cancel the workflow
if (-not $commits) {
Write-Output "No relevant commits in the last 24 hours. Cancelling workflow."
exit 0
}
# Join commits into a newline-separated string
$formattedCommits = $commits -join "`n"
Write-Output "Commits: $formattedCommits`n"
# Generate release notes
$releaseNotes = "### Changes in the Last 24 Hours`n`n$formattedCommits"
$ReleaseTag = "nightly"
Write-Output "Updating existing release: $ReleaseTag"
gh release edit $ReleaseTag --notes "$ReleaseNotes"
$ReleaseTag = "nightly"
Write-Output "Updating existing release: $ReleaseTag"
gh release edit $ReleaseTag --notes "### Changes in the Last 24 Hours`n`nNo changes..."
}
else {
# Join commits into a newline-separated string
$formattedCommits = $commits -join "`n"
Write-Output "Commits: $formattedCommits`n"
# Generate release notes
$releaseNotes = "### Changes in the Last 24 Hours`n`n$formattedCommits"

$ReleaseTag = "nightly"
Write-Output "Updating existing release: $ReleaseTag"
gh release edit $ReleaseTag --notes "$ReleaseNotes"
}



0 comments on commit 7f6daf8

Please sign in to comment.