-
-
Notifications
You must be signed in to change notification settings - Fork 319
103 lines (85 loc) · 3.01 KB
/
release_notifications.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Send Release Notifications
on:
workflow_dispatch:
release:
types: [published]
jobs:
release-notification-output:
runs-on: ubuntu-latest
outputs:
changeLogText: ${{ steps.readChanglog.outputs.text }}
tweetText: ${{ steps.readTweet.outputs.text }}
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
fetch-depth: 0 # gets git history for changelogs
- name: Hack around https://github.com/actions/checkout/issues/290
run: |
git fetch --tags --force
- name: Generate Changelog
id: Changelog
run: ./generate_changelog.sh
- name: Save Changelog in Variable
uses: Stanzilla/cat@2.0.2
id: readChanglog
with:
path: CHANGELOG.md
- name: Generate Twitter Text
id: twitter_post
run: /usr/bin/env python3 .github/scripts/generate_twitter_post.py
- name: Save Twitter Post in Variable
uses: Stanzilla/cat@2.0.2
id: readTweet
with:
path: twitter_post.txt
discord-release-notification:
runs-on: ubuntu-latest
needs: release-notification-output
env:
MESSAGE: "New WeakAuras Release"
steps:
- name: Send Discord Notification
id: discord
uses: tsickert/discord-webhook@v6.0.0
if: success()
with:
webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }}
embed-title: ${{ env.MESSAGE }}
embed-url: https://github.com/WeakAuras/WeakAuras2/releases/latest
embed-description: ${{needs.release-notification-output.outputs.changeLogText}}
twitter-release-notification:
runs-on: ubuntu-latest
needs: release-notification-output
steps:
- name: Send Twitter Notification
id: twitter
uses: nearform-actions/github-action-notify-twitter@v1
with:
message: ${{needs.release-notification-output.outputs.tweetText}}
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_API_KEY_SECRET }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
mastodon-release-notification:
runs-on: ubuntu-latest
needs: release-notification-output
steps:
- name: Send Mastodon Notification
id: mastodon
uses: cbrgm/mastodon-github-action@v2.1.8
with:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
url: ${{ secrets.MASTODON_URL }}
message: ${{needs.release-notification-output.outputs.tweetText}}
bluesky-release-notification:
runs-on: ubuntu-latest
needs: release-notification-output
steps:
- name: Send Bluesky Notification
id: bluesky
uses: myConsciousness/bluesky-post@v5
with:
text: ${{needs.release-notification-output.outputs.tweetText}}
identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
password: ${{ secrets.BLUESKY_PASSWORD }}