10
10
branches : [ "master", "dev" ]
11
11
12
12
jobs :
13
- build-test :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v4
21
+ with :
22
+ python-version : ' 3.10'
23
+
24
+ - name : Install pypa-build
25
+ run : python -m pip install build
26
+
27
+ - name : Create wheel and sdist
28
+ run : python -m build -s -w --outdir dist .
29
+
30
+ - name : Upload sdist
31
+ uses : actions/upload-artifact@v3
32
+ with :
33
+ name : sdist
34
+ path : dist/*.tar.gz
35
+
36
+ - name : Upload wheel
37
+ uses : actions/upload-artifact@v3
38
+ with :
39
+ name : wheel
40
+ path : dist/*.whl
41
+
42
+ test :
14
43
runs-on : ${{ matrix.os }}
44
+ needs : build
45
+
15
46
strategy :
16
47
fail-fast : false
17
48
matrix :
@@ -20,38 +51,42 @@ jobs:
20
51
21
52
steps :
22
53
- uses : actions/checkout@v3
54
+
23
55
- name : Set up Python ${{ matrix.python-version }}
24
- uses : actions/setup-python@v3
56
+ uses : actions/setup-python@v4
25
57
with :
26
58
python-version : ${{ matrix.python-version }}
27
59
28
60
- name : Setup FFmpeg
29
61
uses : FedericoCarboni/setup-ffmpeg@v1.1.0
30
62
63
+ - name : Download wheel
64
+ uses : actions/download-artifact@v3
65
+ with :
66
+ name : wheel
67
+ path : dist
68
+
31
69
- name : Run Unit Tests
70
+ shell : bash
32
71
run : |
72
+ python -m pip install dist/*
33
73
python -m unittest discover tests -v
34
74
35
75
latest-release :
36
- needs : build- test
76
+ needs : test
37
77
runs-on : ubuntu-latest
38
78
steps :
39
- - uses : actions/checkout@v2
40
-
41
- - name : Set up Python
42
- uses : actions/setup-python@v3
79
+ - name : Download sdist
80
+ uses : actions/download-artifact@v3
43
81
with :
44
- python-version : " 3.10"
45
-
46
- - name : Create sdist
47
- run : |
48
- python setup.py sdist
82
+ name : sdist
83
+ path : dist
49
84
50
- - name : Create Artifact sdist
51
- uses : actions/upload -artifact@v3
85
+ - name : Download wheel
86
+ uses : actions/download -artifact@v3
52
87
with :
53
- name : sdist
54
- path : dist/*.tar.gz
88
+ name : wheel
89
+ path : dist
55
90
56
91
- uses : " marvinpinto/action-automatic-releases@latest"
57
92
if : ${{ github.ref == 'refs/heads/master' }}
61
96
prerelease : true
62
97
title : " Development Build"
63
98
files : |
64
- dist/*.tar.gz
99
+ dist/*.tar.gz
100
+ dist/*.whl
0 commit comments