Skip to content

Commit 36e2fd6

Browse files
committed
Add tweetrel bot
1 parent 11f795c commit 36e2fd6

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/scripts/build-tweet.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import tweetrel
2+
tweetrel.send_tweet()

.github/workflows/tweet.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: tweet
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types: [published]
6+
defaults:
7+
run: { shell: bash }
8+
9+
jobs:
10+
11+
build:
12+
strategy:
13+
fail-fast: false
14+
matrix: { os: [ubuntu] }
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v1
18+
- uses: actions/setup-python@v2
19+
with: {python-version: '3.8'}
20+
- name: Run script
21+
env:
22+
CONTEXT_GITHUB: ${{ toJson(github) }}
23+
CONTEXT_SECRETS: ${{ toJson(secrets) }}
24+
TWEETREL_TEMPLATE: |
25+
We are proud to announce the {tag_name} release of Borum Jot for Web!
26+
27+
For more, see: {html_url}. Here are the details:
28+
{body}
29+
run: |
30+
pip install -Uq tweetrel
31+
python .github/scripts/build-tweet.py

0 commit comments

Comments
 (0)