File tree Expand file tree Collapse file tree 3 files changed +74
-9
lines changed Expand file tree Collapse file tree 3 files changed +74
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : Release to PyPI
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ release :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Set up Python
15
+ uses : actions/setup-python@v4
16
+ with :
17
+ python-version : ' 3.10'
18
+
19
+ - name : Install build dependencies
20
+ run : |
21
+ python -m pip install --upgrade pip
22
+ pip install build twine
23
+
24
+ - name : Build package
25
+ run : python -m build
26
+
27
+ - name : Publish to PyPI
28
+ env :
29
+ TWINE_USERNAME : __token__
30
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
31
+ run : |
32
+ twine upload dist/*
33
+
34
+ - name : Verify upload
35
+ run : |
36
+ pip install zip2zip==${{ github.event.release.tag_name }}
Original file line number Diff line number Diff line change
1
+ name : Test and Build
2
+
3
+ on :
4
+ push :
5
+ branches : [ main, dev ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ python-version : ['3.10', '3.11', '3.12']
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Set up Python ${{ matrix.python-version }}
21
+ uses : actions/setup-python@v4
22
+ with :
23
+ python-version : ${{ matrix.python-version }}
24
+
25
+ - name : Install dependencies
26
+ run : |
27
+ python -m pip install --upgrade pip
28
+ pip install -e .
29
+ pip install pytest
30
+
31
+ - name : Run tests
32
+ run : |
33
+ pytest tests/ -v
34
+
35
+ - name : Build package
36
+ run : |
37
+ pip install build
38
+ python -m build
Original file line number Diff line number Diff line change @@ -32,12 +32,3 @@ repos:
32
32
types : [ python ]
33
33
pass_filenames : false
34
34
stages : [ commit ]
35
-
36
-
37
- # - repo: https://github.com/pre-commit/mirrors-mypy
38
- # rev: '' # Use the sha / tag you want to point at
39
- # hooks:
40
- # - id: mypy
41
- # args: [--strict, --ignore-missing-imports]
42
- # additional_dependencies: ['mypy']
43
- # types: [python]
You can’t perform that action at this time.
0 commit comments