From 322c2bb2150c55cedca8f42d566d58a2f401228b Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Sat, 23 May 2020 10:39:53 +0200 Subject: [PATCH] Send emails on failure --- .github/workflows/npmpublish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 3b8e76482..c8783834e 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -15,6 +15,18 @@ jobs: - run: npm i - run: npm run build - run: npm test + - name: Send mail on fail + uses: dawidd6/action-send-mail@v2 + if: ${{ failure() }} + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: Github Actions job result + body: Test job of ${{github.repository}} failed! + to: ${{secrets.MAIL_TARGET}} + from: Github Actions publish-npm: needs: build @@ -30,3 +42,15 @@ jobs: - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + - name: Send mail on fail + uses: dawidd6/action-send-mail@v2 + if: ${{ failure() }} + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: Github Actions job result + body: Publish job of ${{github.repository}} failed! + to: ${{secrets.MAIL_TARGET}} + from: Github Actions