!build testing..

This commit is contained in:
2025-07-20 05:42:40 +10:00
parent fca711e1a8
commit 151b511a16

View File

@@ -140,40 +140,34 @@ jobs:
# Get commits with format: short hash, subject, author # Get commits with format: short hash, subject, author
$commits = & git log $commitRange --pretty=format:"%h|%s|%an" --no-merges $commits = & git log $commitRange --pretty=format:"%h|%s|%an" --no-merges
# Create a temporary file to store commit history # Build commit history as a single string
$tempFile = [System.IO.Path]::GetTempFileName() $commitHistory = ""
if ($commits) { if ($commits) {
"## Changes Since Last Release" | Out-File -FilePath $tempFile -Encoding UTF8 $commitHistory += "`n`n## Changes Since Last Release`n`n"
"" | Out-File -FilePath $tempFile -Append -Encoding UTF8
$commits | ForEach-Object { $commits | ForEach-Object {
$parts = $_ -split '\|', 3 $parts = $_ -split '\|', 3
$hash = $parts[0] $hash = $parts[0]
$subject = $parts[1] -replace '"', '\"' $subject = $parts[1] -replace '"', '""'
$author = $parts[2] $author = $parts[2]
$commitUrl = "https://github.com/${{ github.repository }}/commit/$hash" $commitUrl = "https://github.com/${{ github.repository }}/commit/$hash"
"- [$hash]($commitUrl) $subject (by $author)" | Out-File -FilePath $tempFile -Append -Encoding UTF8 $commitHistory += "- [$hash]($commitUrl) $subject (by $author)`n"
} }
} else { } else {
"## Changes Since Last Release" | Out-File -FilePath $tempFile -Encoding UTF8 $commitHistory += "`n`n## Changes Since Last Release`n`nNo new commits since last release.`n"
"" | Out-File -FilePath $tempFile -Append -Encoding UTF8
"No new commits since last release." | Out-File -FilePath $tempFile -Append -Encoding UTF8
} }
# Set outputs for use in next steps using multiline syntax # Set outputs for use in next steps
echo "tag=$tag" >> $env:GITHUB_OUTPUT echo "tag=$tag" >> $env:GITHUB_OUTPUT
echo "release_name=$releaseName" >> $env:GITHUB_OUTPUT echo "release_name=$releaseName" >> $env:GITHUB_OUTPUT
echo "short_sha=$shortSha" >> $env:GITHUB_OUTPUT echo "short_sha=$shortSha" >> $env:GITHUB_OUTPUT
echo "build_number=$buildNumber" >> $env:GITHUB_OUTPUT echo "build_number=$buildNumber" >> $env:GITHUB_OUTPUT
# Use heredoc syntax for multiline commit history # Use heredoc syntax for multiline commit history
echo "commit_history<<EOF" >> $env:GITHUB_OUTPUT Add-Content -Path $env:GITHUB_OUTPUT -Value "commit_history<<EOF"
Get-Content $tempFile | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding UTF8 Add-Content -Path $env:GITHUB_OUTPUT -Value $commitHistory
echo "EOF" >> $env:GITHUB_OUTPUT Add-Content -Path $env:GITHUB_OUTPUT -Value "EOF"
# Clean up temp file
Remove-Item $tempFile
- name: Download Windows Build - name: Download Windows Build
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with: