From 137f05cbc9a0eb77613138396d59b2520f65b207 Mon Sep 17 00:00:00 2001 From: David Badura Date: Fri, 2 Feb 2024 12:11:08 +0100 Subject: [PATCH] add mastodon notification --- ...t-on-release.yml => notify-on-release.yml} | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) rename .github/workflows/{tweet-on-release.yml => notify-on-release.yml} (62%) diff --git a/.github/workflows/tweet-on-release.yml b/.github/workflows/notify-on-release.yml similarity index 62% rename from .github/workflows/tweet-on-release.yml rename to .github/workflows/notify-on-release.yml index 9e50b91f5..56e0575d1 100644 --- a/.github/workflows/tweet-on-release.yml +++ b/.github/workflows/notify-on-release.yml @@ -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 @@ -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 }}