Skip to content

Commit

Permalink
chore: add github action to notify release (#1627)
Browse files Browse the repository at this point in the history
* Create notify_release_created.yml
* Update and rename notify_release_created.yml to notify_release.yml
* add event data to webhook
  • Loading branch information
div5yesh authored Jan 20, 2022
1 parent 8380da6 commit 31d2526
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/notify_release.yml
Original file line number Diff line number Diff line change
@@ -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}}"}'

0 comments on commit 31d2526

Please sign in to comment.