@@ -103,12 +103,10 @@ jobs:
103103 # Read the summary file
104104 SINCE_SUMMARY=$(cat /tmp/since-tags-summary.md)
105105
106- # Properly escape the content for GitHub Actions
107- SINCE_SUMMARY="${SINCE_SUMMARY//'%'/'%25'}"
108- SINCE_SUMMARY="${SINCE_SUMMARY//$'\n'/'%0A'}"
109- SINCE_SUMMARY="${SINCE_SUMMARY//$'\r'/'%0D'}"
106+ # Replace @ with ` to prevent GitHub from interpreting as user mentions
107+ SINCE_SUMMARY=$(echo "$SINCE_SUMMARY" | sed 's/@since/`@since`/g')
110108
111- # Set the output
109+ # Set the output without any encoding (we'll handle that in the release notes step)
112110 echo "has_updates=true" >> $GITHUB_OUTPUT
113111 echo "summary<<EOF" >> $GITHUB_OUTPUT
114112 echo "$SINCE_SUMMARY" >> $GITHUB_OUTPUT
@@ -177,10 +175,14 @@ jobs:
177175 # Set the content for GitHub Actions output
178176 # Properly escape the content for GitHub Actions
179177 RELEASE_NOTES=$(cat /tmp/release-notes/release_notes.md)
178+
179+ # First escape GitHub Actions special characters
180180 RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"
181- RELEASE_NOTES="${RELEASE_NOTES//$'\n'/'%0A'}"
182181 RELEASE_NOTES="${RELEASE_NOTES//$'\r'/'%0D'}"
183182
183+ # Then handle newlines last to prevent double-escaping
184+ RELEASE_NOTES="${RELEASE_NOTES//$'\n'/'%0A'}"
185+
184186 echo "content<<EOF" >> $GITHUB_OUTPUT
185187 echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
186188 echo "EOF" >> $GITHUB_OUTPUT
0 commit comments