瀏覽代碼

feat(notify-discord): add custom_title input for customizable release notifications in Discord

Mathias 1 月之前
父節點
當前提交
cb608cf8f4
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      .github/workflows/notify-discord.yml

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

@@ -9,6 +9,10 @@ on:
         description: "Tag name (leave empty for latest release)"
         required: false
         type: string
+      custom_title:
+        description: "Custom title for the release notification"
+        required: false
+        type: string
 
 jobs:
   Discord:
@@ -84,7 +88,7 @@ jobs:
             "avatar_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
             "embeds": [
               {
-                "title": "🚀 New Release: ${{ steps.release-info.outputs.tag_name }}",
+                "title": "🚀 New Release: ${{ steps.release-info.outputs.tag_name }}${{ github.event.inputs.custom_title && ' - ' || '' }}${{ github.event.inputs.custom_title || '' }}",
                 "description": "${{ steps.release-info.outputs.name }}",
                 "url": "${{ steps.release-info.outputs.html_url }}",
                 "color": 5763719,