Skip to content

Commit 755cf95

Browse files
committed
try to fix whl resolution issue v2
1 parent e5f1e49 commit 755cf95

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,25 @@ jobs:
234234
name: pypccl-${{ runner.os }}-${{ matrix.build_type }}-${{ matrix.pccl_build_cuda_support == 'ON' && 'cuda' || 'nocuda' }}-${{ github.run_id }}
235235
path: ./python/framework/dist/pypccl-*.whl
236236

237-
- name: Find Python wheel
237+
- name: Find Python wheel (Unix)
238+
if: runner.os != 'Windows'
238239
id: find_wheel
240+
shell: bash
241+
run: |
242+
for file in "${{ github.workspace }}/python/framework/dist/"*pccl*.whl; do
243+
echo "wheel_path=$file" >> "$GITHUB_OUTPUT"
244+
echo "wheel_name=${file##*/}" >> "$GITHUB_OUTPUT"
245+
break
246+
done
247+
248+
- name: Find Python wheel (Windows)
249+
if: runner.os == 'Windows'
250+
id: find_wheel
251+
shell: powershell
239252
run: |
240-
path=$(ls "${{ github.workspace }}/python/framework/dist/"*pccl*.whl)
241-
echo "wheel_path=$path" >> "$GITHUB_OUTPUT"
242-
echo "wheel_name=$(basename "$path")" >> "$GITHUB_OUTPUT"
253+
$file = Get-ChildItem -Path "${{ github.workspace }}\python\framework\dist" -Filter "*pccl*.whl" | Select-Object -First 1
254+
echo "wheel_path=$($file.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
255+
echo "wheel_name=$($file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
243256
244257
- name: Upload Release Asset
245258
uses: actions/upload-release-asset@v1

0 commit comments

Comments
 (0)