Skip to content

Commit 52076c9

Browse files
committed
Add fix to actions to publish wheels
1 parent 7761ecf commit 52076c9

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/build_wheels.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
145145
CIBW_PRERELEASE_PYTHONS: True
146146
CIBW_FREE_THREADED_SUPPORT: True
147-
CIBW_OUTPUT_DIR: ./wheelhouse
147+
CIBW_OUTPUT_DIR: ./dist
148148
CIBW_BUILD_VERBOSITY: 2
149149
CIBW_ENVIRONMENT: CFLAGS="-I/project/pyci/include" LDFLAGS="-L/project/pyci"
150150

@@ -154,23 +154,29 @@ jobs:
154154
# macos-x86_64-accelerate wheels targeting macos-14 were renamed to 13
155155
# so they could be tested. Shift wheel name back to targeting 14.
156156
if [[ ${{ matrix.buildplat[0] }} == 'macos-13' && ${{ matrix.buildplat[4] }} == '14.0' ]]; then
157-
mv ./wheelhouse/*.whl $(find ./wheelhouse -type f -name '*.whl' | sed 's/13_0/14_0/')
157+
mv ./dist/*.whl $(find ./dist -type f -name '*.whl' | sed 's/13_0/14_0/')
158158
fi
159159
160160
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
161161
with:
162-
path: ./wheelhouse/*.whl
162+
path: ./dist/*.whl
163163
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
164164
${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }}
165165
${{ matrix.buildplat[4] }}
166166

167+
merge-build-artifacts:
168+
runs-on: ubuntu-latest
169+
needs: build_wheels
170+
steps:
171+
- name: python-package-distributions
172+
uses: actions/upload-artifact/merge@v4
173+
167174
publish-to-pypi:
168175
name: Publish Python distribution to PyPI
169-
170176
# only publish to PyPI on tag pushes
171177
if: startsWith(github.ref, 'refs/tags/')
172178
needs:
173-
- build_wheels
179+
- merge-build-artifacts
174180
runs-on: ubuntu-latest
175181
environment:
176182
name: PyPI-Release
@@ -182,7 +188,8 @@ jobs:
182188
- name: Download all the dists
183189
uses: actions/download-artifact@v4
184190
with:
185-
path: wheelhouse
191+
name: python-package-distributions
192+
path: dist/
186193
- name: Publish distribution to PyPI
187194
uses: pypa/gh-action-pypi-publish@release/v1
188195
env:

0 commit comments

Comments
 (0)