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