This action is unmaintained and probably does not work anymore.
Tweets from a GitHub action workflow.
You need a Twitter application to authenticate to the Twitter API and use it e.g. for sending tweets.
If you don't have already one, you can create in on developer.twitter.com/apps. Then you should set the app permissions to Read and Write and fetch the consumer keys (API key and API secret key) plus the access token and secret for the user on which behalf the action should tweet.
Store these tokens and keys as secrets in your repository, e.g. as
TWITTER_API_KEY
for the consumer API key,TWITTER_API_SECRET_KEY
for the consumer API secret key,TWITTER_ACCESS_TOKEN
for the user access token, andTWITTER_ACCESS_TOKEN_SECRET
for the user secret.
- uses: twwd/twitter-github-action@v1
with:
twitter_api_key: ${{ secrets.TWITTER_API_KEY }}
twitter_api_secret_key: ${{ secrets.TWITTER_API_SECRET_KEY }}
twitter_access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
tweet_body: 'The content of the tweet'
name: "Tweet about release"
on:
release:
types: [ released ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Tweet
uses: twwd/twitter-github-action@v1
with:
twitter_api_key: ${{ secrets.TWITTER_API_KEY }}
twitter_api_secret_key: ${{ secrets.TWITTER_API_SECRET_KEY }}
twitter_access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
tweet_body: |
We just released version ${{ github.event.release.tag_name }} of ${{ github.event.repository.name }} 🎉
Check it out here ${{ github.event.release.html_url }}