2023-02-10 10:24:22 +00:00
|
|
|
name: Social media notifications
|
2021-05-04 21:08:14 +00:00
|
|
|
|
|
|
|
on: [ push ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
notify_twitter:
|
2022-05-23 20:12:57 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2021-05-04 21:08:14 +00:00
|
|
|
if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master'
|
|
|
|
|
|
|
|
steps:
|
2022-11-03 06:01:47 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-01-18 14:16:33 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2021-05-04 21:08:14 +00:00
|
|
|
with:
|
2021-08-07 06:51:34 +00:00
|
|
|
node-version: '14'
|
2021-05-04 21:08:14 +00:00
|
|
|
- run: npm i twit
|
|
|
|
- run: |
|
2021-08-15 18:50:12 +00:00
|
|
|
node ${{ github.workspace }}/Meta/tweet-commits.js << 'EOF'
|
2021-05-04 21:08:14 +00:00
|
|
|
${{ toJSON(github.event) }}
|
|
|
|
EOF
|
|
|
|
env:
|
|
|
|
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }}
|
|
|
|
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }}
|
|
|
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
|
2023-02-10 10:24:22 +00:00
|
|
|
|
|
|
|
notify_mastodon:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
- run: npm i mastodon
|
|
|
|
- run: |
|
|
|
|
node ${{ github.workspace }}/Meta/toot-commits.js << 'EOF'
|
|
|
|
${{ toJSON(github.event) }}
|
|
|
|
EOF
|
|
|
|
env:
|
|
|
|
ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
|