name: "Tweet the release"
on:
  workflow_dispatch:
  release:
    types: [published]
permissions:
  contents: read
jobs:
  twitter-release:
    runs-on: ubuntu-22.04
    steps:
      - uses: ethomson/send-tweet-action@288f9339e0412e3038dce350e0da5ecdf12133a6
        with:
          status: "minikube ${{github.ref_name}} was just released! Check it out: https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md"
          consumer-key: ${{ secrets.TWITTER_API_KEY }}
          consumer-secret: ${{ secrets.TWITTER_API_SECRET }}
          access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
          access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
