File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : QuantLLM CI/CD
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ tags :
7
+ - ' v*'
8
+ pull_request :
9
+ branches : [ main ]
10
+
11
+ jobs :
12
+ format :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v3
16
+
17
+ - name : Set up Python
18
+ uses : actions/setup-python@v4
19
+ with :
20
+ python-version : " 3.10"
21
+
22
+ - name : Install dependencies
23
+ run : |
24
+ python -m pip install --upgrade pip
25
+ pip install black isort
26
+
27
+ - name : Check formatting
28
+ run : |
29
+ black . --check --diff
30
+ isort . --check-only --diff
31
+
32
+ publish :
33
+ needs : [format]
34
+ runs-on : ubuntu-latest
35
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
36
+
37
+ steps :
38
+ - uses : actions/checkout@v3
39
+
40
+ - name : Set up Python
41
+ uses : actions/setup-python@v4
42
+ with :
43
+ python-version : " 3.10"
44
+
45
+ - name : Install dependencies
46
+ run : |
47
+ python -m pip install --upgrade pip
48
+ pip install build twine
49
+
50
+ - name : Build package
51
+ run : python -m build
52
+
53
+ - name : Publish to PyPI
54
+ env :
55
+ TWINE_USERNAME : __token__
56
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
57
+ run : |
58
+ twine check dist/*
59
+ twine upload dist/*
You can’t perform that action at this time.
0 commit comments