Browse Source

chore(notify-discord): refactor DISCORD_EMBEDS JSON structure for improved readability and maintainability

Mathias 1 month ago
parent
commit
acc80457ff
1 changed files with 1 additions and 21 deletions
  1. 1 21
      .github/workflows/notify-discord.yml

+ 1 - 21
.github/workflows/notify-discord.yml

@@ -80,27 +80,7 @@ jobs:
         env:
           DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
           DISCORD_AVATAR: 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'
-          DISCORD_EMBEDS: '[{
-          "title": "🚀 New Release: ${{ steps.release-info.outputs.tag_name }}",
-          "description": "${{ steps.release-info.outputs.name }}\n\n${{ steps.release-info.outputs.body }}",
-          "url": "${{ steps.release-info.outputs.html_url }}",
-          "color": 5763719,
-          "thumbnail": {
-            "url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
-          },
-          "fields": [
-            { "name": "📦 Version", "value": "`${{ steps.release-info.outputs.tag_name }}`", "inline": true },
-            { "name": "👤 Released by", "value": "[${{ steps.release-info.outputs.author_login }}](${{ steps.release-info.outputs.author_html_url }})", "inline": true },
-            { "name": "📁 Repository", "value": "[${{ github.event.repository.name }}](${{ github.event.repository.html_url }})", "inline": true },
-            { "name": "🔗 Download", "value": "[Release Page](${{ steps.release-info.outputs.html_url }})", "inline": true },
-            { "name": "📝 Files Changed", "value": "• ${{ steps.changed-files.outputs.all_changed_files }}", "inline": false }
-          ],
-          "timestamp": "${{ steps.release-info.outputs.published_at }}",
-          "footer": {
-            "text": "Workout Cool • Release",
-            "icon_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
-          }
-          }]'
+          DISCORD_EMBEDS: '[{"title": "🚀 New Release: ${{ steps.release-info.outputs.tag_name }}", "description": "${{ steps.release-info.outputs.name }}\n\n${{ steps.release-info.outputs.body }}", "url": "${{ steps.release-info.outputs.html_url }}", "color": 5763719, "thumbnail": {"url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"}, "fields": [{"name": "📦 Version", "value": "`${{ steps.release-info.outputs.tag_name }}`", "inline": true}, {"name": "👤 Released by", "value": "[${{ steps.release-info.outputs.author_login }}](${{ steps.release-info.outputs.author_html_url }})", "inline": true}, {"name": "📁 Repository", "value": "[${{ github.event.repository.name }}](${{ github.event.repository.html_url }})", "inline": true}, {"name": "🔗 Download", "value": "[Release Page](${{ steps.release-info.outputs.html_url }})", "inline": true}, {"name": "📝 Files Changed", "value": "• ${{ steps.changed-files.outputs.all_changed_files }}", "inline": false}], "timestamp": "${{ steps.release-info.outputs.published_at }}", "footer": {"text": "Workout Cool • Release", "icon_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"}}]'
         uses: Ilshidur/action-discord@master
 
 # https://stackoverflow.com/a/68068674/19395252