Bump dawidd6/action-send-mail from 3 to 4
[yosql.git] / .github / workflows / release-announcement.yml
blobdd1845a45e4b429182c95aadad435c6562422061
1 name: Announce Release
2 on:
3   release:
4     types: [released]
5 jobs:
6   announce:
7     name: Send Announcements
8     runs-on: ubuntu-latest
9     steps:
10       - id: checkout
11         name: Clone Git Repository
12         uses: actions/checkout@v4
13         with:
14           fetch-depth: 0
15       - id: last_release
16         name: Fetch last release info
17         run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT
18         env:
19           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20       - id: mail
21         name: Send Mail
22         uses: dawidd6/action-send-mail@v4
23         with:
24           server_address: ${{ secrets.MAIL_SERVER }}
25           server_port: ${{ secrets.MAIL_PORT }}
26           username: ${{ secrets.MAIL_USERNAME }}
27           password: ${{ secrets.MAIL_PASSWORD }}
28           subject: ${{ github.event.repository.name }} version ${{ steps.last_release.outputs.tag }} published
29           body: See https://github.com/metio/yosql/releases/tag/${{ steps.last_release.outputs.tag }} for details.
30           to: ${{ secrets.MAIL_RECIPIENT }}
31           from: ${{ secrets.MAIL_SENDER }}
32       - id: matrix
33         name: Send Matrix Message
34         uses: s3krit/matrix-message-action@v0.0.3
35         with:
36           room_id: ${{ secrets.MATRIX_ROOM_ID }}
37           access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
38           message: ${{ github.event.repository.name }} version [${{ steps.last_release.outputs.tag }}](https://github.com/metio/yosql/releases/tag/${{ steps.last_release.outputs.tag }}) published
39           server: ${{ secrets.MATRIX_SERVER }}