Skip to content

Commit b58e038

Browse files
committed
fix release asset name collision
1 parent 9fecdea commit b58e038

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,25 @@ jobs:
192192
if: runner.os != 'Windows'
193193
run: cd ${{ github.workspace }}/python/framework && CMAKE_GENERATOR="${{ matrix.generator }}" PCCL_BUILD_CUDA_SUPPORT=${{ matrix.pccl_build_cuda_support }} pip3 wheel --verbose -w dist .
194194

195+
- name: Prepare artifacts directory (Unix)
196+
if: runner.os != 'Windows'
197+
run: |
198+
mkdir -p artifacts/lib artifacts/include
199+
cp "${{ steps.strings-unix.outputs.build-output-dir }}"/*pccl.* artifacts/lib/
200+
cp ./include/*.h artifacts/include/
201+
202+
- name: Prepare artifacts directory (Windows)
203+
if: runner.os == 'Windows'
204+
shell: powershell
205+
run: |
206+
New-Item -ItemType Directory -Force -Path artifacts\lib, artifacts\include
207+
Copy-Item -Path "${{ steps.strings-windows.outputs.build-output-dir }}\*pccl.*" -Destination artifacts\lib
208+
Copy-Item -Path ".\include\*.h" -Destination artifacts\include
209+
195210
- name: Create Python virtual environment (Unix)
196211
if: ${{ runner.os != 'Windows' && matrix.is_host_arch }}
197212
run: python3 -m venv ${{ github.workspace }}/venv
198213

199-
- name: Prepare local artifacts directory
200-
run: |
201-
mkdir -p artifacts/lib
202-
cp "${{ steps.strings-unix.outputs.build-output-dir }}"/*pccl.* artifacts/lib/
203-
mkdir -p artifacts/include
204-
cp ./include/*.h artifacts/include/
205214
- name: Upload build artifacts
206215
uses: actions/upload-artifact@v4
207216
with:
@@ -261,5 +270,5 @@ jobs:
261270
with:
262271
upload_url: ${{ needs.create_release.outputs.upload_url }}
263272
asset_path: ${{ runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_path || steps.find_wheel_unix.outputs.wheel_path }}
264-
asset_name: ${{ runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_name || steps.find_wheel_unix.outputs.wheel_name }}
273+
asset_name: ${{ replace(runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_name || steps.find_wheel_unix.outputs.wheel_name, '.whl', matrix.pccl_build_cuda_support == 'ON' && 'cuda.whl' || 'nocuda.whl') }}
265274
asset_content_type: application/zip

0 commit comments

Comments
 (0)