From 06e2cb1e3a8a6eb2486d8575a5da6c5dcbe3708e Mon Sep 17 00:00:00 2001 From: ravali-rimmalapudi <83863595+ravali-rimmalapudi@users.noreply.github.com> Date: Tue, 12 Oct 2021 12:35:20 +0530 Subject: [PATCH] feat: Added the github actions to send the slack notifications (#164) * feat: Added the github actions to send the slack notifications * Update release.yml --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f56703e5..a2a75236 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,21 @@ on: description: 'HomeBrew prerelease' default: 'false' jobs: + notify-start: + name: Notify Release Started + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} + SLACK_COLOR: "#36a64f" + SLACK_USERNAME: CLI Release Bot + SLACK_ICON_EMOJI: ":ship:" + SLACK_TITLE: "Twilio Cli" + SLACK_MESSAGE: 'Release Started :rocket:' + MSG_MINIMAL: actions url test: runs-on: ubuntu-latest strategy: @@ -104,3 +119,20 @@ jobs: BRANCH_NAME: ${{github.event.inputs.cli-branch}} REPO_NAME: twilio/twilio-cli INPUTS: '{ "change-log": ${{ toJSON(needs.update-api-specs.outputs.change-log) }}, "version-type": "${{needs.update-api-specs.outputs.version-type}}", "homebrew-branch": "${{github.event.inputs.homebrew-branch}}", "homebrew-prerelease": "${{github.event.inputs.homebrew-prerelease}}" }' + notify-complete-fail: + if: ${{ failure() || cancelled() }} + needs: [ triggerCliWorkflow ] + name: Notify Release Failed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.ALERT_SLACK_WEB_HOOK }} + SLACK_COLOR: "#ff3333" + SLACK_USERNAME: CLI Release Bot + SLACK_ICON_EMOJI: ":ship:" + SLACK_TITLE: "Twilio Cli-core" + SLACK_MESSAGE: 'Release workflow Failed' + MSG_MINIMAL: actions url