-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (32 loc) · 1.23 KB
/
release-notification.yml
File metadata and controls
35 lines (32 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release-Notification
on:
# Remove after testing
workflow_dispatch:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Get Latest Release
id: latest-release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
excludes: prerelease, draft
- name: Notify Standard Model Bot
id: notify
env:
# Slack Channel: design-system-discussion
CHANNEL: "C046HHS5KTN"
URL: "https://6vq8s36zn7.execute-api.us-east-1.amazonaws.com/tools"
# Organization level secret
TOKEN: ${{ secrets.KAJABI_CHAT_BOT_TOKEN_TOOLS }}
TAG: ${{ steps.latest-release.outputs.release }}
EMOJI: "sageicon"
UPDATE_TOPIC: "true"
REPO: "sage-lib"
run: |
echo "{\"type\": \"software-release\", \"repo\": \"$REPO\", \"tag\": \"$TAG\", \"channels\": \"$CHANNEL\", \"emoji\": \"$EMOJI\", \"updateTopic\": \"$UPDATE_TOPIC\"}" | \
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -d @- "$URL/slack/webhook"