From d616e0f1bcef0e0bd914deacdd48544a7616a7bf Mon Sep 17 00:00:00 2001 From: Duoc Nguyen Date: Sat, 14 Nov 2020 12:57:39 +0700 Subject: [PATCH] feat: send email --- .github/workflows/release.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0c720c..534f30d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,4 +48,23 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./ebook.epub asset_name: ebook-${{ env.VERSION }}.epub - asset_content_type: application/epub+zip \ No newline at end of file + asset_content_type: application/epub+zip + + - name: Rename Ebook Filename + run: | + docker-apt-install calibre + ebook-convert ebook.epub ebook.mobi + + - name: Send mail + uses: dawidd6/action-send-mail@master + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: Github Actions job result + body: New ebook build + to: ${{secrets.MAIL_TO}} + from: ${{secrets.MAIL_FROM}} + content_type: text/html + attachments: ebook.mobi \ No newline at end of file