Skip to content

Commit 5c33e07

Browse files
authored
fix auto upload logic
1 parent d0075df commit 5c33e07

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/conda_build.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ jobs:
7272
uname -a
7373
sysctl hw.memsize hw.ncpu hw.physicalcpu 2>/dev/null || cat /proc/meminfo 2>/dev/null | head -3 || true
7474
75+
- name: Configure Auto-upload
76+
if: >
77+
(github.event_name == 'push' && github.ref == 'refs/heads/stable') ||
78+
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/stable')
79+
run: |
80+
conda config --set anaconda_upload yes
81+
7582
- name: Build Binary
7683
env:
7784
CONDA_VERBOSITY: "1"
@@ -86,15 +93,7 @@ jobs:
8693
# Strict priority makes the solver skip lower-priority channels entirely
8794
# for any package the higher-priority channel offers.
8895
conda config --set channel_priority strict
89-
conda config --set anaconda_upload no
90-
CONDA_NPY=${{ matrix.numpy-version }} CONDA_PY=${{ matrix.python-version }} conda build .
91-
92-
- name: Upload Built Binaries
93-
if: >
94-
(github.event_name == 'push' && github.ref == 'refs/heads/stable') ||
95-
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/stable')
96-
run: |
97-
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload $(conda build --output)
96+
CONDA_NPY=${{ matrix.numpy-version }} CONDA_PY=${{ matrix.python-version }} conda build --token $CONDA_TOKEN --user rmg .
9897
9998
result:
10099
if: ${{ always() }}

0 commit comments

Comments
 (0)