Github Action for posting a twitter tweet
- Register as a twitter app developer in here
- Create new twitter application in here
- Use app's credentials in github actions.
Required Twitter api key
Required Twitter api key secret
Required Twitter Consumer access token.
Required Twitter Consumer access token secret.
Required Status to be published to twitter.
ID of the created tweet.
name: publish-to-twitter
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: infraway/tweet-action@v1
with:
status: Tweeted from Github Actions
api_key: ${{ secrets.TWITTER_API_KEY }}
api_key_secret: ${{ secrets.TWITTER_API_KEY_SECRET }}
access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}