@@ -2,58 +2,28 @@ name: Publish cryptlex.lexfloatclient package
22
33on :
44 workflow_dispatch :
5- inputs :
6- libraryVersion :
7- description : ' Library Version'
8- required : true
9- default : ' '
10- packageVersion :
11- description : ' Package Version'
12- required : true
13- default : ' '
145
156jobs :
16- update-version :
17- runs-on : ubuntu-latest
18- steps :
19- - name : Checkout code
20- uses : actions/checkout@v2
21-
22- - name : Update Package Version
23- run : |
24- sed -i '/version=/!b;c \ \ \ \ version="${{ github.event.inputs.packageVersion }}",' setup.py
25-
26- - name : Update Library Version
27- run : |
28- sed -i '/lexfloatclient_libs_version =/!b;clexfloatclient_libs_version = "v${{ github.event.inputs.libraryVersion }}"' pre-publish.py
29-
30- - name : Commit, Tag and Push
31- run : |
32- git add pre-publish.py
33- git add setup.py
34- git config user.name github-actions
35- git config user.email github-actions@github.com
36- git commit -m "updated version" | exit 0
37- git tag ${{ github.event.inputs.packageVersion }}
38- git push & git push --tags
39-
407 deploy :
41- needs : update-version
428 runs-on : ubuntu-latest
43-
449 steps :
4510 - uses : actions/checkout@v2
11+
4612 - run : git pull origin master --ff-only
13+
4714 - name : Set up Python
4815 uses : actions/setup-python@v1
4916 with :
5017 python-version : ' 3.x'
18+
5119 - name : Install dependencies
5220 run : |
5321 python -m pip install --upgrade pip
5422 pip install setuptools wheel twine
23+
5524 - name : Download Native Libs
5625 run : python pre-publish.py
26+
5727 - name : Build and publish
5828 env :
5929 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
0 commit comments