File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ echo_info ""
5959readonly ABOUT_FILE=" firebase_admin/__about__.py"
6060echo_info " Loading version from: ${ABOUT_FILE} "
6161
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
6463if [[ -z " ${RELEASE_VERSION} " ]]; then
6564 echo_warn " Failed to extract release version from: ${ABOUT_FILE} "
6665 terminate
Original file line number Diff line number Diff line change @@ -101,17 +101,6 @@ jobs:
101101 with :
102102 name : dist
103103
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-
115104 - name : Publish preflight check
116105 id : preflight
117106 run : ./.github/scripts/publish_preflight_check.sh
@@ -131,11 +120,22 @@ jobs:
131120 prerelease : false
132121
133122 - name : Publish to Pypi
134- run : echo Publishing to Pypi
123+ uses : pypa/gh-action-pypi-publish@v1.0.0a0
124+ with :
125+ user : firebase
126+ password : ${{ secrets.PYPI_PASSWORD }}
135127
136128 # Post to Twitter if explicitly opted-in by adding the label 'release:tweet'.
137129 - name : Post to Twitter
138130 if : success() &&
139131 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 }}
141141 continue-on-error : true
You can’t perform that action at this time.
0 commit comments