rector/build/target-repository/.github/workflows/tweet_release.yaml
Tomas Votruba 7453122793 ucfirst
2022-01-25 20:57:37 +01:00

27 lines
1.3 KiB
YAML

# inspired from https://github.com/phpstan/phpstan-doctrine/commit/ac331f0a2b7f7724d5a0347b12c802327aa58cf5
name: Tweet Release
on:
release:
types: [published]
jobs:
tweet_release:
runs-on: ubuntu-latest
steps:
-
uses: Eomm/why-don-t-you-tweet@v1
if: ${{ !github.event.repository.private }}
with:
# GitHub event payload
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: "New Release: Rector ${{ github.event.release.tag_name }} ${{ github.event.release.html_url }} #rectorphp"
env:
# Get your tokens from https://developer.twitter.com/en/portal/projects/1486009292276776963/apps/23201457/keys
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
# needs "Read & Write" access, the default is "Read"; see https://twittercommunity.com/t/changing-app-permissions-missing-in-ui/163708/8 on how to elevate
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}