Commit e35a45a 1 parent 5b244a2 commit e35a45a Copy full SHA for e35a45a
File tree 2 files changed +14
-15
lines changed
2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ echo_info ""
59
59
readonly ABOUT_FILE=" firebase_admin/__about__.py"
60
60
echo_info " Loading version from: ${ABOUT_FILE} "
61
61
62
- readonly VERSION_SCRIPT=" exec(open('${ABOUT_FILE} ').read()); print(__version__)"
63
- readonly RELEASE_VERSION=` python -c " ${VERSION_SCRIPT} " ` || true
62
+ readonly RELEASE_VERSION=` grep " __version__" ${ABOUT_FILE} | awk ' {print $3}' | tr -d \' ` || true
64
63
if [[ -z " ${RELEASE_VERSION} " ]]; then
65
64
echo_warn " Failed to extract release version from: ${ABOUT_FILE} "
66
65
terminate
Original file line number Diff line number Diff line change @@ -101,17 +101,6 @@ jobs:
101
101
with :
102
102
name : dist
103
103
104
- # Python is needed to run Twine and some of the preflight checks.
105
- - name : Set up Python
106
- uses : actions/setup-python@v1
107
- with :
108
- python-version : 3.6
109
-
110
- - name : Install dependencies
111
- run : |
112
- python -m pip install --upgrade pip
113
- pip install twine
114
-
115
104
- name : Publish preflight check
116
105
id : preflight
117
106
run : ./.github/scripts/publish_preflight_check.sh
@@ -131,11 +120,22 @@ jobs:
131
120
prerelease : false
132
121
133
122
- name : Publish to Pypi
134
- run : echo Publishing to Pypi
123
+
124
+ with :
125
+ user : firebase
126
+ password : ${{ secrets.PYPI_PASSWORD }}
135
127
136
128
# Post to Twitter if explicitly opted-in by adding the label 'release:tweet'.
137
129
- name : Post to Twitter
138
130
if : success() &&
139
131
contains(github.event.pull_request.labels.*.name, 'release:tweet')
140
- run : echo Posting Tweet
132
+ uses : ethomson/send-tweet-action@288f9339e0412e3038dce350e0da5ecdf12133a6
133
+ with :
134
+ status : >
135
+ ${{ steps.preflight.outputs.version }} of @Firebase Admin Python SDK is avaialble.
136
+ https://github.com/firebase/firebase-admin-python/releases/tag/${{ steps.preflight.outputs.version }}
137
+ consumer-key : ${{ secrets.TWITTER_CONSUMER_KEY }}
138
+ consumer-secret : ${{ secrets.TWITTER_CONSUMER_SECRET }}
139
+ access-token : ${{ secrets.TWITTER_ACCESS_TOKEN }}
140
+ access-token-secret : ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
141
141
continue-on-error : true
You can’t perform that action at this time.
0 commit comments