File tree Expand file tree Collapse file tree 2 files changed +60
-1
lines changed
Expand file tree Collapse file tree 2 files changed +60
-1
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ push :
4+ branches :
5+ - " **"
6+ pull_request :
7+ branches :
8+ - " **"
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v3
15+ - name : Set up Python
16+ uses : actions/setup-python@v3
17+ with :
18+ python-version : " 3.x"
19+ - name : Install dependencies
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install build requests sseclient-py python-dotenv pytest
23+ - name : Build package
24+ run : python -m build
25+ - name : Run Tests
26+ env :
27+ CB_PROJECT_ID : ${{ secrets.CB_PROJECT_ID }}
28+ run : pytest
29+
30+ release :
31+ runs-on : ubuntu-latest
32+ needs : build
33+ steps :
34+ - uses : actions/checkout@v3
35+ - name : Set up Python
36+ uses : actions/setup-python@v3
37+ with :
38+ python-version : " 3.x"
39+ - name : Install dependencies
40+ run : |
41+ python -m pip install --upgrade pip
42+ pip install build
43+ - uses : go-semantic-release/action@v1
44+ id : semrel
45+ with :
46+ github-token : ${{ secrets.GITHUB_TOKEN }}
47+ allow-initial-development-versions : true
48+ - name : Set version number
49+ if : steps.semrel.outputs.version != ''
50+ run : sed -i -e 's/version = "0.0.0"/version = "${{ steps.semrel.outputs.version }}"/g' ./pyproject.toml
51+ - name : Build package
52+ if : steps.semrel.outputs.version != ''
53+ run : python -m build
54+ - name : Publish package
55+ uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
56+ if : steps.semrel.outputs.version != ''
57+ with :
58+ user : __token__
59+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ description = "Commonbase Python SDK"
88readme = " README.md"
99license.file = " LICENSE"
1010requires-python = " >=3.8"
11- version = " 0.1.4 "
11+ version = " 0.0.0 "
1212dependencies = [" requests>=2.31.0" , " sseclient-py>=1.7.2" ]
1313urls.Homepage = " https://github.com/commonbaseapp/commonbase-python"
1414urls.Source = " https://github.com/commonbaseapp/commonbase-python"
You can’t perform that action at this time.
0 commit comments