Here we set up a short Python script which can be run locally or using GH Actions to post a tweet to your Twitter account.

Example

See Tweet GitHub Actions as a simple template repo that you can use.

MichaelCurrin - tweet-gh-actions-py

Set up scripts

See Tweet in the Python section this project for file below.

Add files to your repo:

  • requirements.txt
  • tweet.py

Configure workflow

Set up a workflow to handle:

  • Python
  • Python packages
  • Environment variables
  • Posting a tweet

The workflow file of the Tweet GitHub Actions repo linked above for a reference.