File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+ release :
9
+ types : [created]
10
+
11
+ jobs :
12
+ test :
13
+ runs-on : ubuntu-latest
14
+ strategy :
15
+ matrix :
16
+ python-version : ["3.10"]
17
+
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+
21
+ - name : Set up Python ${{ matrix.python-version }}
22
+ uses : actions/setup-python@v4
23
+ with :
24
+ python-version : ${{ matrix.python-version }}
25
+
26
+ - name : Install dependencies
27
+ run : |
28
+ python -m pip install --upgrade pip
29
+ pip install build pytest pytest-cov ruff
30
+ pip install -e .
31
+
32
+ - name : Lint with ruff
33
+ run : |
34
+ ruff check .
35
+
36
+ - name : Build package
37
+ run : python -m build
38
+
39
+ publish :
40
+ needs : test
41
+ runs-on : ubuntu-latest
42
+ if : github.event_name == 'release' && github.event.action == 'created'
43
+
44
+ steps :
45
+ - uses : actions/checkout@v3
46
+
47
+ - name : Set up Python
48
+ uses : actions/setup-python@v4
49
+ with :
50
+ python-version : " 3.10"
51
+
52
+ - name : Install dependencies
53
+ run : |
54
+ python -m pip install --upgrade pip
55
+ pip install build twine
56
+
57
+ - name : Build and publish
58
+ env :
59
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
60
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
61
+ run : |
62
+ python -m build
63
+ python -m twine upload dist/*
You can’t perform that action at this time.
0 commit comments