Sylius/.github/workflows/social-media-notifications.yaml
2024-03-07 18:22:20 +01:00

29 lines
1 KiB
YAML

name: Social media notifications
on:
release:
types: [created]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Tweet about new release
uses: Eomm/why-don-t-you-tweet@v1
with:
tweet-message: "🤖 New #Sylius release: ${{ github.event.release.tag_name }} (${{ steps.date.outputs.date }})\n\n ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}"
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}