Skip to content

Commit 3fd2f5a

Browse files
committed
Add wheels upload to anaconda
1 parent 511241f commit 3fd2f5a

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/conda-package.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ jobs:
6363
run: conda config --remove channels defaults
6464

6565
- name: Store conda paths as envs
66-
run: echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
66+
run: |
67+
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
68+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
69+
echo "WHEELS_NAME=$PACKAGE_NAME" | tr "-" "_" >> $GITHUB_ENV
6770
6871
# boa is an extention to conda so we can use mamba resolver in conda build
6972
- name: Install conda-build
@@ -78,6 +81,11 @@ jobs:
7881
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
7982
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
8083

84+
- name: Upload wheels artifact
85+
uses: actions/upload-artifact@v3
86+
with:
87+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
88+
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.WHEELS_NAME }}-*.whl
8189

8290
test:
8391
name: Test ['${{ matrix.os }}', python='${{ matrix.python }}']
@@ -217,6 +225,11 @@ jobs:
217225
with:
218226
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
219227

228+
- name: Download wheels artifact
229+
uses: actions/download-artifact@v3
230+
with:
231+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
232+
220233
- name: Setup miniconda
221234
uses: conda-incubator/setup-miniconda@v2
222235
with:
@@ -233,3 +246,10 @@ jobs:
233246

234247
- name: Upload
235248
run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
249+
250+
- name: Store wheels name
251+
run: |
252+
echo "WHEELS_NAME=$PACKAGE_NAME" | tr "-" "_" >> $GITHUB_ENV
253+
254+
- name: Upload Wheels
255+
run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.WHEELS_NAME }}-*.whl

0 commit comments

Comments
 (0)