Browse Source

CI: Fix Sparkle appcast release note generation

The current steps attempted to remove SSH signatures from signed git
commits/tags by making the release notes string into a single line,
running sed, then restoring the newlines. However, this resulted in all
n characters being missing from the resulting output. We can use targeted
git ref format specifiers instead of trying to use sed.

https://git-scm.com/docs/git-for-each-ref/2.41.0#Documentation/git-for-each-ref.txt-contentssubject
https://git-scm.com/docs/git-for-each-ref/2.41.0#Documentation/git-for-each-ref.txt-contentsbody
Ryan Foster 2 years ago
parent
commit
8e66cb823c
1 changed files with 4 additions and 6 deletions
  1. 4 6
      .github/actions/sparkle-appcast/action.yaml

+ 4 - 6
.github/actions/sparkle-appcast/action.yaml

@@ -135,12 +135,10 @@ runs:
         : Prepare Release Notes 📝
         : Prepare Release Notes 📝
         if (( ${+RUNNER_DEBUG} )) setopt XTRACE
         if (( ${+RUNNER_DEBUG} )) setopt XTRACE
 
 
-        git tag -l --format='%(contents)' ${GITHUB_REF_NAME} \
-          | tr '\n' '\\n' \
-          | sed 's/-----BEGIN SSH SIGNATURE-----.*-----END SSH SIGNATURE-----//g' \
-          | tr '\\n' '\n' > notes.rst
-
-        sed -i '' '2i\'$'\n''###################################################' notes.rst
+        git tag -l --format='%(contents:subject)' ${GITHUB_REF_NAME} > notes.rst
+        echo '###################################################' >> notes.rst
+        echo '' >> notes.rst
+        git tag -l --format='%(contents:body)' ${GITHUB_REF_NAME} >> notes.rst
         pandoc -f rst -t html notes.rst -o output/appcasts/notes_${{ inputs.channel }}.html
         pandoc -f rst -t html notes.rst -o output/appcasts/notes_${{ inputs.channel }}.html
 
 
     - name: Generate Appcast 🎙️
     - name: Generate Appcast 🎙️