File tree Expand file tree Collapse file tree 1 file changed +17
-26
lines changed Expand file tree Collapse file tree 1 file changed +17
-26
lines changed Original file line number Diff line number Diff line change 7
7
name : build-publish
8
8
9
9
on :
10
+ workflow_dispatch :
11
+ push :
12
+ branches : [master]
13
+ pull_request :
14
+ paths :
15
+ - ' .github/workflows/build-publish.yml'
10
16
release :
11
17
types : [published]
12
18
13
19
jobs :
14
- build-wheels :
15
- runs-on : ${{ matrix.os }}
20
+ build :
21
+ name : Build sdist and wheel
22
+ runs-on : ubuntu-latest
16
23
permissions :
17
- contents : read
18
- strategy :
19
- matrix :
20
- include :
21
- - os : ubuntu-latest
22
- python : 39
23
- platform : manylinux_x86_64
24
- - os : ubuntu-latest
25
- python : 310
26
- platform : manylinux_x86_64
27
- - os : ubuntu-latest
28
- python : 311
29
- platform : manylinux_x86_64
30
- - os : ubuntu-latest
31
- python : 312
32
- platform : manylinux_x86_64
33
-
34
-
24
+ contents : read
35
25
steps :
36
26
- uses : actions/checkout@v4
37
27
- name : Set up Python
@@ -40,20 +30,21 @@ jobs:
40
30
python-version : 3.x
41
31
- name : Install dependencies
42
32
run : python -m pip install --upgrade setuptools wheel build
43
- - name : Build wheels
33
+ - name : Build sdist and wheel
44
34
run : python -m build --sdist --wheel
45
- - name : Store wheels
35
+ - name : Store sdist and wheel
46
36
uses : actions/upload-artifact@v4
47
37
with :
38
+ name : artifact
48
39
path : dist
49
-
50
40
publish :
41
+ name : Publish to PyPI
42
+ needs : [build]
51
43
runs-on : ubuntu-latest
52
- needs :
53
- - build-wheels
44
+ environment : pypi
54
45
if : github.event_name == 'release' && github.event.action == 'published'
55
46
steps :
56
- - name : Download dists
47
+ - name : Download dist
57
48
uses : actions/download-artifact@v4
58
49
with :
59
50
name : artifact
You can’t perform that action at this time.
0 commit comments