File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ name: Build and upload to PyPI
2
2
3
3
on :
4
4
release :
5
- types : [published]
5
+ types : [published, edited]
6
+ push :
7
+ # branches:
8
+ # - main
6
9
7
10
jobs :
8
11
build_wheels :
@@ -17,18 +20,17 @@ jobs:
17
20
18
21
- uses : actions/setup-python@v5
19
22
name : Install Python
20
- with :
21
- python-version : ' 3.x'
22
23
23
24
- name : Build wheels
24
25
# For very recent Python versions, wheels from e.g. numpy might not be
25
26
# available yet which can cause the build to fail. Keep going, and upload
26
27
# the wheels for all of the previous versions when that happens.
27
28
continue-on-error : true
28
- uses : pypa/cibuildwheel@v2.20 .0
29
+ uses : pypa/cibuildwheel@v2.22 .0
29
30
30
31
- uses : actions/upload-artifact@v4
31
32
with :
33
+ name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
32
34
path : ./wheelhouse/*.whl
33
35
34
36
build_sdist :
39
41
40
42
- uses : actions/setup-python@v5
41
43
name : Install Python
42
- with :
43
- python-version : ' 3.x'
44
44
45
45
- name : Install build
46
46
run : python -m pip install build
@@ -50,17 +50,22 @@ jobs:
50
50
51
51
- uses : actions/upload-artifact@v4
52
52
with :
53
+ name : cibw-sdist
53
54
path : dist/*.tar.gz
54
55
55
56
upload_pypi :
56
57
name : Upload to PyPI
57
58
needs : [build_wheels, build_sdist]
58
59
runs-on : ubuntu-latest
60
+ permissions :
61
+ id-token : write
62
+ if : startsWith(github.ref, 'refs/tags/v')
59
63
steps :
60
64
- uses : actions/download-artifact@v4
61
65
with :
62
- name : artifact
63
- path : dist
66
+ pattern : cibw-*
67
+ path : dist
68
+ merge-multiple : true
64
69
65
70
- uses : pypa/gh-action-pypi-publish@release/v1
66
71
with :
You can’t perform that action at this time.
0 commit comments