File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed
Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Package to PyPI
2+ on :
3+ push :
4+ tags :
5+ - ' v*'
6+ jobs :
7+ tests :
8+ name : Run Tests
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Set up Python
14+ uses : actions/setup-python@v4
15+ with :
16+ python-version : " 3.8"
17+ cache : ' pip'
18+
19+ - name : Install dependencies
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install -r requirements/dev.txt
23+
24+ - name : Run tests (excluding OpenAI)
25+ run : coverage run -m pytest -m "not open_ai"
26+
27+ - name : Show coverage report
28+ run : coverage report
29+ build-n-publish :
30+ name : Build and Publish
31+ needs : tests
32+ runs-on : ubuntu-latest
33+ environment :
34+ name : pypi
35+ url : https://pypi.org/p/typesense
36+ permissions :
37+ id-token : write
38+ contents : read
39+ steps :
40+ - uses : actions/checkout@v4
41+ with :
42+ fetch-depth : 0
43+
44+ - name : Set up Python
45+ uses : actions/setup-python@v4
46+ with :
47+ python-version : " 3.8"
48+ cache : pip
49+
50+ - name : Install build dependencies
51+ run : |
52+ python -m pip install --upgrade pip
53+ pip install build
54+ - name : Build package
55+ run : |
56+ rm -rf dist/
57+ python -m build
58+ - name : Publish to PyPI
59+ uses : pypa/gh-action-pypi-publish@release/v1
60+ with :
61+ attestations : true
You can’t perform that action at this time.
0 commit comments