diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index e5dd2452..d21fcd20 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -141,11 +141,39 @@ jobs: pip install pytest pytest if: matrix.platform == 'windows-latest' - - - name: Upload wheels as build artifacts + + - name: Upload wheels as build artifacts (non-windows) + if: matrix.platform != 'windows-latest' + run: | + for wheel_file in dist/*.whl; do + echo "Uploading $wheel_file" + echo "::set-output name=wheel_file::$wheel_file" + echo "::set-output name=artifact_name::$(basename $wheel_file)" + done + id: get_wheel_files + + - name: Upload wheels as build artifacts (windows) + if: matrix.platform == 'windows-latest' + shell: pwsh + run: | + foreach ($wheel_file in Get-ChildItem -Path dist -Filter *.whl) { + Write-Output "Uploading $wheel_file" + echo "::set-output name=wheel_file::$wheel_file" + echo "::set-output name=artifact_name::$(Split-Path $wheel_file -Leaf)" + } + id: get_wheel_files + + - name: Upload wheel file uses: actions/upload-artifact@v4 with: - path: dist/*.whl + name: ${{ steps.get_wheel_files.outputs.artifact_name }} + path: ${{ steps.get_wheel_files.outputs.wheel_file }} + +# - name: Upload wheels as build artifacts +# uses: actions/upload-artifact@v4 +# with: +# name: wheels-${{ matrix.platform }}-${{ matrix.python-version }} +# path: dist/*.whl - name: Setup tmate session uses: mxschmitt/action-tmate@v3