From 612bf8814fc2cbb16be099a001c039e8fcbd8a05 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Tue, 12 May 2026 11:17:41 +0200 Subject: [PATCH] fix(ci): match release + forge-announce parsing to current yaml format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both workflows looked for "**Hellion Chat " as the changelog subblock header, but the yaml convention is "**v" (matches verify-changelog-sync.sh and the slim-rule grep). Plus the indent-strip was 2 spaces, but prettier writes the changelog block with 4-space indent. Both regressions silently failed every release-workflow run since the format change — likely why v1.4.3 was released manually. Sync header marker to "**v$version " and indent-strip to 4 spaces in both files. --- .gitea/workflows/forge-announce.yml | 6 +++--- .gitea/workflows/release.yml | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/forge-announce.yml b/.gitea/workflows/forge-announce.yml index af87077..10e82ea 100644 --- a/.gitea/workflows/forge-announce.yml +++ b/.gitea/workflows/forge-announce.yml @@ -101,16 +101,16 @@ jobs: if ($idx -lt 0) { throw "V5: changelog-Block nicht gefunden in $yamlPath" } $afterMarker = $raw.Substring($idx + $marker.Length) $changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object { - if ($_ -match '^ ') { $_.Substring(2) } else { $_ } + if ($_ -match '^ ') { $_.Substring(4) } else { $_ } }) -join "`n" - $header = "**Hellion Chat $version" + $header = "**v$version " $start = $changelogBody.IndexOf($header) if ($start -lt 0) { throw "V5: No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging." } $rest = $changelogBody.Substring($start) - $nextHdr = $rest.IndexOf("`n`n**Hellion Chat ", 1) + $nextHdr = $rest.IndexOf("`n`n**v", 1) $trailer = $rest.IndexOf("`n`n---") if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) { $enBlock = $rest.Substring(0, $nextHdr).TrimEnd() diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ea91226..4615366 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -111,20 +111,22 @@ jobs: # changelog: is the last top-level key in the manifest, so # everything after the marker is the literal block. Strip the - # 2-space yaml indent from each line. + # 4-space yaml indent (prettier convention) from each line. $afterMarker = $raw.Substring($idx + $marker.Length) $changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object { - if ($_ -match '^ ') { $_.Substring(2) } else { $_ } + if ($_ -match '^ ') { $_.Substring(4) } else { $_ } }) -join "`n" - $header = "**Hellion Chat $version" + # Subblock convention: "**vX.Y.Z — ()**" + # matches verify-changelog-sync.sh and slim-rule grep. + $header = "**v$version " $start = $changelogBody.IndexOf($header) if ($start -lt 0) { throw "No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging a release." } $rest = $changelogBody.Substring($start) - $nextHdr = $rest.IndexOf("`n`n**Hellion Chat ", 1) + $nextHdr = $rest.IndexOf("`n`n**v", 1) $trailer = $rest.IndexOf("`n`n---") if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) {