Skip to content

Commit

Permalink
🐞 fix: failed to send email
Browse files Browse the repository at this point in the history
failed to send build notfication mail due to no `from` field #27
  • Loading branch information
aaron-yang-biz committed Aug 17, 2022
1 parent 3d5acb0 commit 2b76aa4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
!!! Info
`(#{number})` means an issue of this project. You may check details of the issue by visiting https://github.com/zillionare/python-project-wizard/issues/_{number}_

## v1.3.1
*[#26](https://github.com/zillionare/python-project-wizard/issues/26) use mike to deploy multiple version of documentation directly, removed github action peaceiris/actions-gh-pages@v3
## v1.3
* [#23](https://github.com/zillionare/python-project-wizard/issues/23) add email notification upon build success
* [#24](https://github.com/zillionare/python-project-wizard/issues/24) config repo secrets by script
Expand Down
9 changes: 8 additions & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,13 @@ This will give you a test report and a lint report. You should see no errors exc
The script looks like the following:
```
# uncomment the following to create repo and push code to github
# gh repo create {{cookiecutter.project_slug}} --public
# git remote add origin [email protected]:{{cookiecutter.github_username}}/{{cookiecutter.project_slug}}.git
# git add .
# pre-commit run --all-files
# git add .
# git commit -m "Initial commit by ppw"
# gh repo create {{cookiecutter.project_slug}} --public -s . --push
# git branch -M main

# Uncomment the following to config github secret used by github workflow.
# gh secret set PERSONAL_TOKEN --body $GH_TOKEN
Expand All @@ -167,9 +171,12 @@ This will give you a test report and a lint report. You should see no errors exc

# uncomment the following if you need to setup email notification
# gh secret set BUILD_NOTIFY_MAIL_SERVER --body $BUILD_NOTIFY_MAIL_SERVER
# gh secret set BUILD_NOTIFY_MAIL_PORT --body $BUILD_NOTIFY_MAIL_PORT
# gh secret set BUILD_NOTIFY_MAIL_FROM --body $BUILD_NOTIFY_MAIL_FROM
# gh secret set BUILD_NOTIFY_MAIL_PASSWORD --body $BUILD_NOTIFY_MAIL_PASSWORD
# gh secret set BUILD_NOTIFY_MAIL_RCPT --body $BUILD_NOTIFY_MAIL_RCPT

# git push -u origin main
```
before launch the script, you will need to apply github personal token and set environment variable GH_TOKEN beforehand. And you need install the tool [**gh**](https://cli.github.com/) too.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool]
[tool.poetry]
name = "ppw"
version = "1.3.0"
version = "1.3.1"
description = "A Wizard to create a skeleton python project with up-to-date technology"
license = "BSD-3-Clause"
authors = ["Aaron Yang <[email protected]>"]
Expand Down
1 change: 1 addition & 0 deletions {{cookiecutter.project_slug}}/.github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ jobs:
server_port: ${{ secrets.BUILD_NOTIFY_MAIL_PORT }}
username: ${{ secrets.BUILD_NOTIFY_MAIL_FROM }}
password: ${{ secrets.BUILD_NOTIFY_MAIL_PASSWORD }}
from: build-bot
to: ${{ secrets.BUILD_NOTIFY_MAIL_RCPT }}
subject: ${{ env.package_name }}.${{ env.package_version}} build success
body: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
server_port: ${{ secrets.BUILD_NOTIFY_MAIL_PORT }}
username: ${{ secrets.BUILD_NOTIFY_MAIL_FROM }}
password: ${{ secrets.BUILD_NOTIFY_MAIL_PASSWORD }}
from: build-bot
to: ${{ secrets.BUILD_NOTIFY_MAIL_RCPT }}
subject: ${{ env.package_name }}.${{ env.package_version}} build success
body: |
Expand Down

0 comments on commit 2b76aa4

Please sign in to comment.