@@ -3,7 +3,7 @@ name: Build
3
3
on :
4
4
release :
5
5
types :
6
- - published
6
+ - created
7
7
8
8
jobs :
9
9
build_wheels :
25
25
package-dir : .
26
26
output-dir : wheelhouse
27
27
config-file : " {package}/pyproject.toml"
28
-
29
28
- uses : actions/upload-artifact@v4
30
29
with :
31
30
name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
@@ -39,29 +38,35 @@ jobs:
39
38
40
39
- name : Build sdist
41
40
run : pipx run build --sdist
42
-
43
41
- uses : actions/upload-artifact@v4
44
42
with :
45
43
name : cibw-sdist
46
44
path : dist/*.tar.gz
47
- upload_pypi :
48
- needs : [build_wheels, build_sdist]
45
+ # After the build has finished, download the artifacts from the action
46
+ # and upload them to the release. When we publish the release, the
47
+ # assets will be downloaded from it and uploaded to PyPi.
48
+ upload_assets_to_release :
49
+ needs : [build_sdist, build_wheels]
49
50
runs-on : ubuntu-latest
50
- environment :
51
- name : pypi
52
- url : https://pypi.org/p/blis
53
51
permissions :
54
- id-token : write
55
- if : github.event_name == 'release' && github.event.action == 'published'
56
- # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
57
- # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
52
+ contents : write
53
+ checks : write
54
+ actions : read
55
+ issues : read
56
+ packages : write
57
+ pull-requests : read
58
+ repository-projects : read
59
+ statuses : read
58
60
steps :
59
61
- uses : actions/download-artifact@v4
60
62
with :
61
63
# unpacks all CIBW artifacts into dist/
62
64
pattern : cibw-*
63
65
path : dist
64
66
merge-multiple : true
65
- - uses : pypa/gh-action-pypi-publish@release/v1
67
+ -
uses :
alexellis/[email protected]
68
+ env :
69
+ GITHUB_TOKEN : ${{ github.token }}
66
70
with :
67
- repository-url : https://test.pypi.org/legacy/
71
+ asset_paths : ' ["./dist/*"]'
72
+
0 commit comments