Skip to content

Commit 8de5201

Browse files
Merge pull request #1413 from ZzEeKkAa/feature/add_wheels
Add wheels upload to anaconda
2 parents 33ece78 + dd95f97 commit 8de5201

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/conda-package.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
run: echo $CONDA/bin >> $GITHUB_PATH
4343
- name: Install conda-build
4444
run: conda install conda-build
45+
- name: Store conda paths as envs
46+
shell: bash -l {0}
47+
run: |
48+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
4549
- name: Build conda package
4650
run: |
4751
CHANNELS="-c intel -c conda-forge --override-channels"
@@ -57,6 +61,11 @@ jobs:
5761
with:
5862
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
5963
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
64+
- name: Upload wheels artifact
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
68+
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
6069

6170
build_windows:
6271
runs-on: windows-latest
@@ -88,13 +97,22 @@ jobs:
8897
restore-keys: |
8998
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
9099
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
100+
- name: Store conda paths as envs
101+
shell: bash -l {0}
102+
run: |
103+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
91104
- name: Build conda package
92105
run: conda build --no-test --python ${{ matrix.python }} -c intel -c conda-forge --override-channels conda-recipe
93106
- name: Upload artifact
94107
uses: actions/upload-artifact@v3
95108
with:
96109
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
97110
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
111+
- name: Upload wheels artifact
112+
uses: actions/upload-artifact@v3
113+
with:
114+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
115+
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
98116

99117
test_linux:
100118
needs: build_linux
@@ -318,6 +336,11 @@ jobs:
318336
run: |
319337
anaconda --token $ANACONDA_TOKEN upload --user dppy --label dev ${PACKAGE_NAME}-*.tar.bz2
320338
339+
- name: Upload Wheels
340+
env:
341+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
342+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl
343+
321344
upload_windows:
322345
needs: test_windows
323346
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
@@ -343,6 +366,11 @@ jobs:
343366
run: |
344367
anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
345368
369+
- name: Upload Wheels
370+
env:
371+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
372+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl
373+
346374
test_examples_linux:
347375
needs: build_linux
348376
runs-on: ${{ matrix.runner }}

0 commit comments

Comments
 (0)