From 66ed0eda1b32a9933273a36a6c542dd9dd86029e Mon Sep 17 00:00:00 2001 From: Ryan Hullah Date: Tue, 5 Dec 2023 23:07:15 -0500 Subject: [PATCH] Add Discord Release Notification (#2531) --- .github/workflows/discord.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 3b1619fe..3b7ea295 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -1,8 +1,11 @@ name: Discord notifications on: + release: + types: + - published workflow_run: - workflows: ["ContinuousIntegration", "Build and Publish", "Build and publish multiarch" ] + workflows: ["Build and Publish"] types: - completed @@ -14,13 +17,29 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: + - name: on-publish + if: github.event_name == 'release' && github.event.action == 'published' + uses: Ilshidur/action-discord@master + with: + args: | + Github repo: [${{ github.repository }}](<${{ github.event.repository.html_url}}>) + Release: [${{ github.event.release.name }}](<${{ github.event.release.html_url }}>) + ${{ github.event.release.body }} - name: on-success - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: github.event.workflow_run.conclusion == 'success' uses: Ilshidur/action-discord@master with: - args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏" + args: | + Github repo: ${{ github.repository }} + - Branch: ${{ github.event.workflow_run.head_branch }} + - [Link: to Actions](<${{ github.event.workflow_run.html_url }}>) + - Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏 - name: on-failure - if: ${{ github.event.workflow_run.conclusion == 'failure' }} + if: github.event.workflow_run.conclusion == 'failure' uses: Ilshidur/action-discord@master with: - args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥" + args: | + Github repo: ${{ github.repository }} + - Branch: ${{ github.event.workflow_run.head_branch }} + - [Link: to Actions](<${{ github.event.workflow_run.html_url }}>) + - Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥