Send Release Notifications #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.12 | |
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 }} |