Skip to content

Commit

Permalink
fix wheel release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed May 29, 2024
1 parent 5f69c93 commit c2a367b
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set Additional Envs
shell: bash
run: |
echo "DEPLOY=$( [[ $GITHUB_EVENT_NAME == 'push' && $GITHUB_REF == 'refs/tags'* ]] && echo 'True' || echo 'False' )" >> $GITHUB_ENV
echo "PYTHON_SUBVERSION=$(echo $PYTHON_VERSION | cut -c 3-)" >> $GITHUB_ENV
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
Expand Down Expand Up @@ -129,10 +131,10 @@ jobs:
pip install wheelhouse/*whl --force-reinstall
pytest
- name: Upload artifacts to github
if: ${{env.DEPLOY == 'True' && startsWith(matrix.os, 'windows')}}
if: ${{ startsWith(matrix.os, 'windows') }}
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.os }}-3-${{ env.PYTHON_SUBVERSION }}
path: ./wheelhouse


Expand Down Expand Up @@ -184,14 +186,25 @@ jobs:
python -m build -Csetup-args="-Dlink_blas_statically=True" --outdir=wheelhouse
- name: Upload artifacts to github
if: ${{env.DEPLOY == 'True'}}
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.os }}-3-${{ env.PYTHON_SUBVERSION }}
path: ./wheelhouse

upload_wheels:
merge_wheels:
name: Merge wheel artifacts
runs-on: ubuntu-latest
needs: build_wheels
steps:
- name: Merge wheels
uses: actions/upload-artifact/merge@v4
with:
name: wheels
pattern: wheels-*
delete-merged: true

upload_wheels:
needs: merge_wheels
runs-on: ubuntu-latest

env:
Expand Down

0 comments on commit c2a367b

Please sign in to comment.