File tree 1 file changed +37
-1
lines changed
1 file changed +37
-1
lines changed Original file line number Diff line number Diff line change 1
1
name : Build
2
2
3
- on : [pull_request]
3
+ on :
4
+ release :
5
+ types :
6
+ - published
4
7
5
8
jobs :
6
9
build_wheels :
28
31
name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
29
32
path : ./wheelhouse/*.whl
30
33
34
+ build_sdist :
35
+ name : Build source distribution
36
+ runs-on : ubuntu-latest
37
+ steps :
38
+ - uses : actions/checkout@v4
39
+
40
+ - name : Build sdist
41
+ run : pipx run build --sdist
42
+
43
+ - uses : actions/upload-artifact@v4
44
+ with :
45
+ name : cibw-sdist
46
+ path : dist/*.tar.gz
47
+ upload_pypi :
48
+ needs : [build_wheels, build_sdist]
49
+ runs-on : ubuntu-latest
50
+ environment : pypi
51
+ permissions :
52
+ id-token : write
53
+ if : github.event_name == 'release' && github.event.action == 'published'
54
+ # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
55
+ # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
56
+ steps :
57
+ - uses : actions/download-artifact@v4
58
+ with :
59
+ # unpacks all CIBW artifacts into dist/
60
+ pattern : cibw-*
61
+ path : dist
62
+ merge-multiple : true
63
+
64
+ - uses : pypa/gh-action-pypi-publish@release/v1
65
+ with :
66
+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments