forked from bitoiu/release-notify-action
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify about a new release | ||
uses: ba-st-actions/email-release-notification@v2.0.0 | ||
uses: ba-st-actions/email-release-notification@v3.0.0 | ||
env: | ||
SENDGRID_API_TOKEN: ${{ secrets.SENDGRID_API_TOKEN }} | ||
RECIPIENTS_URL: ${{ secrets.RECIPIENTS_URL }} | ||
SENDER_EMAIL: ${{ secrets.SENDER_EMAIL }} | ||
``` | ||
### 2. Set the SendGrid secret | ||
|
@@ -47,6 +48,10 @@ [email protected] | |
|
||
If you don't know where to host this file, just go to [GitHub Gists](https://gist.github.com) and create a new textfile with the e-mails you want to target. After you save the file just click `raw` and get the URI of the file you've just created. | ||
|
||
### 3. Set the SENDER_EMAIL secret | ||
|
||
Do the same for a secret named `SENDER_EMAIL` including the e-mail to be used in the `from:` field on the mail message. | ||
|
||
### 4. Test the workflow! | ||
|
||
Create a new release for your repository and verify that the action triggers and that the e-mails were sent. Sometimes it's worth checking the spam inbox. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
SENDGRID_API_TOKEN= | ||
RECIPIENTS_URL= | ||
SENDER_EMAIL= | ||
GITHUB_EVENT_PATH= |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,14 @@ async function prepareMessage(recipients) { | |
|
||
const releaseBody = converter.makeHtml(`${header}\n\n${release.body}${footer}`); | ||
|
||
const sender = process.env.SENDER_EMAIL; | ||
|
||
return { | ||
to: '[email protected]', | ||
from: { | ||
name: ownerName, | ||
email: '[email protected]', | ||
email: sender, | ||
}, | ||
to: sender, | ||
bcc: recipients, | ||
subject, | ||
html: releaseBody, | ||
|