From b6fdea11a2604ca5125ba8b71f947fe9c17a6b20 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Sat, 28 Aug 2021 19:27:34 +0300 Subject: [PATCH] Refactor webhook trigger in CD --- .github/workflows/CD.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 43adaf47..f246be69 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -75,11 +75,15 @@ jobs: asset_content_type: application/zip - name: Notify Discord - run: | - Invoke-WebRequest ` - -Uri "${{ secrets.DISCORD_WEBHOOK }}" ` - -Method "POST" ` - -ContentType "application/json; charset=UTF-8" ` - -Body '{"content":"**DiscordChatExporter** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: "}' ` - -UseBasicParsing - shell: pwsh + uses: satak/webrequest-action@v1.2.4 + with: + url: ${{ secrets.DISCORD_WEBHOOK }} + method: POST + headers: | + { + "ContentType": "application/json; charset=UTF-8" + } + payload: | + { + "content": "**DiscordChatExporter** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: " + } \ No newline at end of file