Skip to content

Commit

Permalink
test to email notification
Browse files Browse the repository at this point in the history
  • Loading branch information
lfbarrile01 committed Dec 4, 2024
1 parent 5f60618 commit 669c530
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Notification

on:
pull_request:
branches:
- develop
#branches:
#- develop
types:
- opened
- edited
Expand Down Expand Up @@ -62,29 +62,31 @@ jobs:
- name: Send Email using SendGrid
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
TAG: ${{ env.tag }}
REPOSITORY: ${{ github.repository }}
run: |
curl -X POST https://api.sendgrid.com/v3/mail/send \
-H "Authorization: Bearer $SENDGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
-H "Authorization: Bearer $SENDGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"personalizations": [
{
"to": [
{
"email": "releases@lerian.studio"
}
],
"subject": "Nova Release Publicada: ${{ env.tag }}"
"subject": "🎉 Nova Release Disponível: v${TAG}"
}
],
"from": {
"email": "lf@lerian.studio",
"email": "noreply@lerian.studio",
"name": "Lerian Studio Notifications"
},
"content": [
{
"type": "text/plain",
"value": "Confira os detalhes da nova release aqui: https://github.com/${{ github.repository }}/releases/tag/${{ env.tag }}"
"type": "text/html",
"value": "<!DOCTYPE html>\n<html>\n<head>\n <style>\n body {\n font-family: Arial, sans-serif;\n line-height: 1.6;\n }\n h1 {\n color: #36a64f;\n text-align: center;\n }\n p {\n margin: 15px 0;\n }\n a {\n color: #007bff;\n text-decoration: none;\n font-weight: bold;\n }\n </style>\n</head>\n<body>\n <h1>🚀 Nova Release Publicada!</h1>\n <p>Estamos felizes em anunciar que uma nova release foi publicada para o projeto.</p>\n <p>Confira os detalhes e as melhorias diretamente no nosso repositório:</p>\n <p><a href=\"https://github.com/${REPOSITORY}/releases/tag/${TAG}\">Clique aqui para acessar a release v${TAG}</a></p>\n <p>Obrigado por acompanhar nosso trabalho! 💡</p>\n <p>Atenciosamente,</p>\n <p><strong>Lerian Studio Team</strong></p>\n</body>\n</html>"
}
]
}'

0 comments on commit 669c530

Please sign in to comment.