Skip to content

Commit

Permalink
upload each wheel file independently
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jun 10, 2024
1 parent 9441d86 commit 67a50e4
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,45 @@ 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_nonwindows

- 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_windows

- name: Upload wheel file (non-windows)
uses: actions/upload-artifact@v4
with:
name: ${{ steps.get_wheel_files_nonwindows.outputs.artifact_name }}
path: ${{ steps.get_wheel_files_nonwindows.outputs.wheel_file }}

- name: Upload wheel file (windows)
uses: actions/upload-artifact@v4
with:
path: dist/*.whl
name: ${{ steps.get_wheel_files_windows.outputs.artifact_name }}
path: ${{ steps.get_wheel_files_windows.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
Expand Down

0 comments on commit 67a50e4

Please sign in to comment.