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 f0afa5b
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0afa5b

Please sign in to comment.