test some build description stuff out !build

This commit is contained in:
2025-07-20 05:34:24 +10:00
parent fde3f23ed5
commit b7b7d7cdec

View File

@@ -125,11 +125,45 @@ jobs:
Write-Host "Generated tag: $tag"
Write-Host "Generated release name: $releaseName"
# Get the latest release tag to compare against
$latestTag = ""
try {
$latestTag = & git describe --tags --abbrev=0 2>$null
Write-Host "Latest tag found: $latestTag"
} catch {
Write-Host "No previous tags found, showing all commits"
}
# Generate commit history since last tag (or all commits if no tag)
$commitRange = if ($latestTag) { "$latestTag..HEAD" } else { "HEAD" }
$commitHistory = ""
# Get commits with format: short hash, subject, author
$commits = & git log $commitRange --pretty=format:"%h|%s|%an" --no-merges
if ($commits) {
$commitHistory = "`n`n## Changes Since Last Release`n"
$commits | ForEach-Object {
$parts = $_ -split '\|', 3
$hash = $parts[0]
$subject = $parts[1]
$author = $parts[2]
$commitUrl = "https://github.com/${{ github.repository }}/commit/$hash"
$commitHistory += "- [$hash]($commitUrl) $subject (by $author)`n"
}
} else {
$commitHistory = "`n`n## Changes Since Last Release`nNo new commits since last release.`n"
}
# Escape special characters for GitHub output
$commitHistoryEscaped = $commitHistory -replace '"', '\"' -replace '`', '\`'
# Set outputs for use in next steps
echo "tag=$tag" >> $env:GITHUB_OUTPUT
echo "release_name=$releaseName" >> $env:GITHUB_OUTPUT
echo "short_sha=$shortSha" >> $env:GITHUB_OUTPUT
echo "build_number=$buildNumber" >> $env:GITHUB_OUTPUT
echo "commit_history=$commitHistoryEscaped" >> $env:GITHUB_OUTPUT
- name: Download Windows Build
uses: actions/download-artifact@v4
with:
@@ -147,6 +181,12 @@ jobs:
body: |
Automated build of PNGTuber Plus
**Build Information:**
- Build Number: ${{ steps.release_info.outputs.build_number }}
- Commit: [${{ steps.release_info.outputs.short_sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
- Branch: ${{ github.ref_name }}
${{ steps.release_info.outputs.commit_history }}
## Installation
1. Download PNGTuber-Plus.exe from the assets below
2. Run the executable - no installation required!