3
0

changelog escaped gefixt

This commit is contained in:
Michael Otto
2026-03-19 07:57:35 +01:00
parent 167b9dfc64
commit 20b8e2a2a0

View File

@@ -25,7 +25,7 @@ jobs:
- name: Abhängigkeiten installieren
shell: sh
run: |
apk add --no-cache bash jq git rsync zip curl
apk add --no-cache bash jq git rsync zip curl python3
- name: Daten zusammenstellen
id: daten
@@ -347,17 +347,25 @@ jobs:
URL=${{ steps.metadata.outputs.homepage }}/releases/download/${{ steps.daten.outputs.version }}-${{ steps.daten.outputs.channel }}/${{ steps.daten.outputs.zip_file }}
ENTRY="${ENTRY//\{\{URL\}\}/$URL}"
# Zeilenumbrüche → <br/>, Bindestriche am Zeilenanfang → Bullet
CHANGELOG_HTML=$(echo "${{ steps.changelog.outputs.current }}" | \
sed 's/&/\&amp;/g' | \
sed 's/</\&lt;/g' | \
sed 's/>/\&gt;/g' | \
sed 's|^- \(.*\)|• \1|' | \
tr '\n' '§' | \
sed 's/§/<br\/>/g')
export CHANGELOG="${{ steps.changelog.outputs.current }}"
CHANGELOG_HTML=$(python3 - <<'EOF'
import sys, os
text = os.environ.get("CHANGELOG", "")
text = text.replace("&", "&amp;")
text = text.replace("<", "&lt;")
text = text.replace(">", "&gt;")
lines = text.splitlines()
result = "<br/>".join(line for line in lines if line.strip())
print(result, end="")
EOF
)
ENTRY="${ENTRY//\{\{CHANGELOG\}\}/$CHANGELOG_HTML}"
echo "$ENTRY"
# Neue Datei erzeugen