Skip to content

Commit

Permalink
add mastodon notification
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Feb 2, 2024
1 parent 8943c67 commit 137f05c
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Notify new release

name: Tweet new release

# More triggers
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release
on:
release:
types: [published]

jobs:
tweet:
twitter:
runs-on: ubuntu-latest
steps:
- uses: eomm/why-don-t-you-tweet@v1
Expand All @@ -18,8 +15,18 @@ jobs:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! ${{ github.event.release.html_url }}"
env:
# Get your tokens from https://developer.twitter.com/apps
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

mastadon:
runs-on: ubuntu-latest
steps:
- uses: cbrgm/mastodon-github-action@v1
if: ${{ !github.event.repository.private }}
with:
message: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! ${{ github.event.release.html_url }}"
env:
MASTODON_URL: ${{ secrets.MASTODON_URL }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}

0 comments on commit 137f05c

Please sign in to comment.