File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ from tweepy import Client
4+
5+ release_version = sys .argv [1 ]
6+ if release_version .endswith (".0" ):
7+ client = Client (
8+ consumer_key = os .getenv ("TWITTER_API_KEY" ),
9+ consumer_secret = os .getenv ("TWITTER_API_KEY_SECRET" ),
10+ access_token = os .getenv ("TWITTER_ACCESS_TOKEN" ),
11+ access_token_secret = os .getenv ("TWITTER_ACCESS_TOKEN_SECRET" ),
12+ )
13+ link = "https://docs.pulpproject.org/pulpcore/changes.html"
14+ msg = f"pulpcore-{ release_version } - Check out for more details: { link } "
15+ release_msg = f"Hey! We've just released { msg } "
16+ client .create_tweet (text = release_msg )
Original file line number Diff line number Diff line change 1- 2021.08.26-158-gb7cc708
1+ 2021.08.26-160-g672272f
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ jobs:
292292 - name : Install python dependencies
293293 run : |
294294 echo ::group::PYDEPS
295- pip install gitpython python-redmine requests packaging
295+ pip install gitpython python-redmine requests packaging tweepy
296296 echo ::endgroup::
297297
298298 - name : Push branch and tag to GitHub
@@ -347,6 +347,10 @@ jobs:
347347 echo "GH Issues $GH_ISSUES"
348348 python .ci/scripts/update_github.py
349349
350+ - name : Tweet
351+ continue-on-error : true
352+ run : python .ci/scripts/tweet.py ${{ github.event.inputs.release }}
353+
350354 - name : Create release on GitHub
351355 run : bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }}
352356
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ if [ -n "$PULP_CLI_PR_NUMBER" ]; then
106106fi
107107
108108cd pulp-cli
109- pip install -e .
109+ pip install .
110110pulp config create --base-url https://pulp --location tests/cli.toml
111111mkdir ~ /.config/pulp
112112cp tests/cli.toml ~ /.config/pulp/cli.toml
You can’t perform that action at this time.
0 commit comments