Skip to content

Commit

Permalink
ci: add slack messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
ampersarnie committed Dec 5, 2022
1 parent 0a3edc5 commit 13b1621
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ orbs:
node: circleci/[email protected]

jobs:
self_test: # this can be any name you choose
notify_slack:
docker:
- image: cimg/node:17.2.0
steps:
- run:
command: |
curl -X POST -H 'Content-type: application/json' --data '{"text":"New Build Tools Release","blocks":[{"type":"header","text":{"type":"plain_text","text":"New Build Tools Release"}},{"type":"section","fields":[{"type":"mrkdwn","text":"*Version:* <https://github.com/'${CIRCLE_PROJECT_USERNAME}'/'${CIRCLE_PROJECT_REPONAME}'/releases/tag/'${CIRCLE_TAG}'|'${CIRCLE_TAG}'>"},{"type":"mrkdwn","text":"<https://github.com/'${CIRCLE_PROJECT_USERNAME}'/'${CIRCLE_PROJECT_REPONAME}'/issues|Issues> *|* <https://github.com/'${CIRCLE_PROJECT_USERNAME}'/'${CIRCLE_PROJECT_REPONAME}'/pulls|Pull Requests>"}]}]}' ${SLACK_WEBHOOK}
name: Send Slack update to channel
self_test:
docker:
- image: cimg/node:17.2.0
steps:
Expand Down Expand Up @@ -45,4 +53,12 @@ jobs:
workflows:
test_build_tools:
jobs:
- self_test
- self_test
run_notify_slack:
jobs:
- notify_slack:
filters:
tags:
only: /v?[0-9]+\.[0-9]+\.[0-9]+(-(rc|beta|alpha).[0-9]+)?/
branches:
ignore: /.*/

0 comments on commit 13b1621

Please sign in to comment.