Skip to content

v1.23.0-rc.0

v1.23.0-rc.0 #35

Workflow file for this run

name: notify-release
on:
release:
types: [published]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
REPO=$(echo $GITHUB_CONTEXT | jq -r '.repository')
TAGVERSION=$(echo $GITHUB_CONTEXT | jq -r '.event.release.tag_name')
TAGURL=$(echo $GITHUB_CONTEXT | jq -r '.event.release.html_url')
BODY=$(echo $GITHUB_CONTEXT | jq -r '.event.release.body' | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
echo "{\"username\":\"Cloud Bot Notify\",\"icon_url\":\"https://www.mattermost.org/wp-content/uploads/2016/04/icon.png\",\"text\":\"# **New Release for $REPO** - Release [$TAGVERSION]($TAGURL)\n $BODY\"}" > mattermost.json
cat mattermost.json
- uses: mattermost/[email protected]
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}