From e82de4a270bd4732329980922d31fdc2510cb2c9 Mon Sep 17 00:00:00 2001 From: Yasin Date: Sat, 18 Nov 2023 22:14:30 +0100 Subject: [PATCH] discord notification --- .github/workflows/packwiz-export.yml | 34 +++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/packwiz-export.yml b/.github/workflows/packwiz-export.yml index e9a2f7a..d500fe5 100644 --- a/.github/workflows/packwiz-export.yml +++ b/.github/workflows/packwiz-export.yml @@ -57,4 +57,36 @@ jobs: - name: Discord notification run: | - echo "placeholder" + JSON_PAYLOAD='{ + "content": "<@&1175530098066210816>", + "embeds": [ + { + "title": "${{env.PACKVERSION}} for ${{env.MC}}", + "color": 1345667, + "fields": [ + { + "name": "**Changes**", + "value": "${cat latest-changelog.md | tail -n +3 | sed 's/###//' | awk '{$1=$1};1'}" + }, + { + "name": "Downloads", + "value": "[<:modrinth:900697862206287882> Modrinth](https://modrinth.com/modpack/skyblocker-modpack/version/${{env.PACKVERSION}})\n[<:github:900697885706952725> Github](https://github.com/SkyblockerMod/Skyblocker-modpack/releases/tag/${{env.PACKVERSION}})" + } + ], + "author": { + "name": "Skyblocker Modpack", + "url": "https://modrinth.com/modpack/skyblocker-modpack" + }, + "footer": { + "text": "A fabric Mod", + "icon_url": "https://fabricmc.net/assets/logo.png" + }, + "thumbnail": { + "url": "https://hysky.de/skyblocker.png" + } + } + ], + "attachments": [] + }' + + curl -H "Content-Type: application/json" --data-binary "$JSON_PAYLOAD" "${{ secrets.DISCORD_UPDATE_MODPACK_WEBHOOK }}"