From 31d252671fc1aa432842cbc74aeb366271b9d891 Mon Sep 17 00:00:00 2001 From: Divyesh Chitroda Date: Thu, 20 Jan 2022 13:28:19 -0800 Subject: [PATCH] chore: add github action to notify release (#1627) * Create notify_release_created.yml * Update and rename notify_release_created.yml to notify_release.yml * add event data to webhook --- .github/workflows/notify_release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/notify_release.yml diff --git a/.github/workflows/notify_release.yml b/.github/workflows/notify_release.yml new file mode 100644 index 0000000000..cbd7fc927b --- /dev/null +++ b/.github/workflows/notify_release.yml @@ -0,0 +1,24 @@ +# This is a basic workflow to help you get started with Actions + +name: Notify Amplify Android Release + +# Controls when the workflow will run +on: + # Triggers the workflow on release created (draft) or released (stable) events but only for the main branch + release: + types: [created, released] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "notify" + notify: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Run webhook curl command + shell: bash + run: curl -v POST ${{ secrets.SLACK_WEBHOOK_URL }} -H "Content-Type:application/json" --data '{"action":"${{github.event.action}}", "repo":"${{github.event.repository.html_url}}", "version":"${{github.event.release.html_url}}"}' +