mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
33 lines
1.1 KiB
YAML
Executable File
33 lines
1.1 KiB
YAML
Executable File
name: 📧 Twitter and Discord Posts
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
post-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Wait for 15 minutes
|
|
run: sleep 900 # 15 minutes delay
|
|
|
|
# Post to Twitter
|
|
- name: Post to Twitter
|
|
uses: twitter-together/action@v3
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
|
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
|
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
|
TWITTER_API_SECRET_KEY: ${{ secrets.TWITTER_API_SECRET_KEY }}
|
|
with:
|
|
tweet: |
|
|
🎉 New release: **${{ github.event.release.name }}** is live! 🚀
|
|
Check it out here: ${{ github.event.release.html_url }}
|
|
|
|
# Post to Discord
|
|
- name: Post to Discord
|
|
run: |
|
|
curl -X POST -H "Content-Type: application/json" \
|
|
-d '{"content": "🎉 New release: **${{ github.event.release.name }}** is live! 🚀\nCheck it out here: ${{ github.event.release.html_url }}"}' \
|
|
${{ secrets.DISCORD_WEBHOOK_URL }}
|