Skip to content

Commit

Permalink
Move tweet code into release workflow (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasnicolaas committed Jun 8, 2023
1 parent 03d82f4 commit cde04d7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 29 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Release

# yamllint disable rule:line-length
# yamllint disable-line rule:truthy
on:
release:
Expand Down Expand Up @@ -44,3 +45,23 @@ jobs:
run: poetry build --no-interaction
- name: 🚀 Publish package to PyPi
uses: pypa/gh-action-pypi-publish@release/v1

twitter:
name: 🐦 Tweet the release
runs-on: ubuntu-latest
needs: release
steps:
- uses: Eomm/why-don-t-you-tweet@v1
with:
# GitHub event payload
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: |
⬆️ ${{ github.event.release.tag_name }} of ${{ github.event.repository.name }} just released 🎉 #update @klaasnicolaas #python #package #datasets #liege #luik #release #bot #assistant
Check out the release notes here: ${{ github.event.release.html_url }}
env:
# Get your tokens from https://developer.twitter.com/apps
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 }}
29 changes: 0 additions & 29 deletions .github/workflows/tweet-release.yaml

This file was deleted.

0 comments on commit cde04d7

Please sign in to comment.