File tree 2 files changed +43
-33
lines changed
2 files changed +43
-33
lines changed Original file line number Diff line number Diff line change @@ -2,25 +2,29 @@ name: CI
2
2
3
3
on :
4
4
push :
5
- branches : [ "main" ]
5
+ branches : ["main"]
6
+
6
7
pull_request :
7
- branches : [ "main" ]
8
+ branches : ["main"]
8
9
9
10
jobs :
10
11
test :
11
- name : " Test Python ${{ matrix.python-version }}"
12
12
runs-on : ubuntu-20.04
13
+
14
+ name : " Test Python ${{ matrix.python-version }}"
15
+
13
16
strategy :
14
17
fail-fast : false
15
18
matrix :
16
19
python-version : ["3.8", "3.9", "3.10", "3.11"]
20
+
17
21
defaults :
18
22
run :
19
23
shell : bash
24
+
20
25
steps :
21
26
- uses : actions/checkout@v3
22
- - name : Setup Python
23
- uses : actions/setup-python@v3
27
+ - uses : actions/setup-python@v3
24
28
with :
25
29
python-version : ${{ matrix.python-version }}
26
30
cache : " pip"
36
40
python -m black --check .
37
41
- name : Test
38
42
run : python -m pytest
39
-
40
- release :
41
- name : " Release"
42
- runs-on : ubuntu-20.04
43
- steps :
44
- - uses : actions/checkout@master
45
- - name : Setup Python
46
- uses : actions/setup-python@v2
47
- with :
48
- python-version : " 3.10"
49
- - name : Install pypa/build
50
- run : >-
51
- python -m
52
- pip install
53
- build
54
- --user
55
- - name : Build a package
56
- run : >-
57
- python -m
58
- build
59
- --sdist
60
- --outdir dist/
61
- .
62
- - name : Publish distribution 📦 to PyPI
63
- if : startsWith(github.ref, 'refs/tags')
64
- uses : pypa/gh-action-pypi-publish@master
65
- with :
66
- password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags : ["*"]
6
+
7
+ jobs :
8
+ release :
9
+ runs-on : ubuntu-20.04
10
+
11
+ name : " Publish to PyPI"
12
+
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ - uses : actions/setup-python@v3
16
+ with :
17
+ python-version : " 3.10"
18
+ - name : Install pypa/build
19
+ run : >-
20
+ python -m
21
+ pip install
22
+ build
23
+ --user
24
+ - name : Build a package
25
+ run : >-
26
+ python -m
27
+ build
28
+ --sdist
29
+ --outdir dist/
30
+ .
31
+ - name : Publish distribution 📦 to PyPI
32
+ uses : pypa/gh-action-pypi-publish@master
33
+ with :
34
+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments