Send release email and slack #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Send release email and slack" | |
on: | |
workflow_dispatch: | |
inputs: | |
VERSION: | |
description: "Version for subject (eg 7.2.1)" | |
required: true | |
jobs: | |
build-and-release: | |
runs-on: macos-13 | |
steps: | |
- name: "Git checkout" | |
uses: actions/checkout@v3 | |
- name: Send mail | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: smtp.gmail.com | |
server_port: 465 | |
secure: true | |
username: ${{secrets.RELEASE_MAIL_USERNAME}} | |
password: ${{secrets.RELEASE_MAIL_PASSWORD}} | |
subject: AeroLab release v${{inputs.VERSION}} | |
to: ${{secrets.RELEASE_MAIL_TO}} | |
from: AeroLab Release Bot <${{secrets.RELEASE_MAIL_FROM}}> | |
reply_to: ${{secrets.RELEASE_MAIL_FROM}} | |
content_type: text/html | |
convert_markdown: true | |
html_body: file://LATEST.md | |
body: file://LATEST.md | |
- name: "Send slack notification" | |
env: | |
SLACK_CHANNEL: ${{ secrets.RELEASE_SLACK_CHANNEL }} | |
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
run: | | |
curl -d "text=https://github.com/aerospike/aerolab/releases/tag/${{inputs.VERSION}}" -d "channel=${SLACK_CHANNEL}" -H "Authorization: Bearer ${SLACK_TOKEN}" -X POST https://slack.com/api/chat.postMessage || exit 0 |