Skip to content

Commit ac79e9f

Browse files
authored
Set default shell in upload actions (#1180)
1 parent 2ea4aac commit ac79e9f

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

.github/workflows/conda-package.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
uses: conda-incubator/setup-miniconda@v2
4646
with:
4747
auto-update-conda: true
48-
auto-activate-base: true
4948
python-version: ${{ matrix.python }}
5049
miniconda-version: 'latest'
5150
activate-environment: 'build'
@@ -107,7 +106,6 @@ jobs:
107106
uses: conda-incubator/setup-miniconda@v2
108107
with:
109108
auto-update-conda: true
110-
auto-activate-base: true
111109
python-version: ${{ matrix.python }}
112110
miniconda-version: 'latest'
113111
activate-environment: 'build'
@@ -146,6 +144,10 @@ jobs:
146144

147145
runs-on: ubuntu-latest
148146

147+
defaults:
148+
run:
149+
shell: bash -l {0}
150+
149151
strategy:
150152
matrix:
151153
python: ['3.8', '3.9']
@@ -160,21 +162,17 @@ jobs:
160162
uses: conda-incubator/setup-miniconda@v2
161163
with:
162164
auto-update-conda: true
163-
auto-activate-base: true
164165
python-version: ${{ matrix.python }}
165166
miniconda-version: 'latest'
166167
activate-environment: 'upload'
167168

168-
- name: Install client and Upload
169+
- name: Install anaconda-client
170+
run: conda install anaconda-client
171+
172+
- name: Upload
169173
env:
170174
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
171-
run: |
172-
source $CONDA/etc/profile.d/conda.sh
173-
conda info
174-
conda activate upload
175-
ls -lF $CONDA_PREFIX/bin
176-
conda install anaconda-client
177-
anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
175+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
178176

179177
upload_windows:
180178
needs: build_windows
@@ -183,6 +181,10 @@ jobs:
183181

184182
runs-on: windows-latest
185183

184+
defaults:
185+
run:
186+
shell: cmd /C CALL {0}
187+
186188
strategy:
187189
matrix:
188190
python: ['3.8', '3.9']
@@ -196,15 +198,14 @@ jobs:
196198
uses: conda-incubator/setup-miniconda@v2
197199
with:
198200
auto-update-conda: true
199-
auto-activate-base: true
200201
python-version: ${{ matrix.python }}
201202
miniconda-version: 'latest'
202203
activate-environment: 'upload'
203204

204-
- name: Install client and Upload
205+
- name: Install anaconda-client
206+
run: conda install anaconda-client
207+
208+
- name: Upload
205209
env:
206210
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
207-
run: |
208-
conda activate upload
209-
conda install anaconda-client
210-
anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
211+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2

0 commit comments

Comments
 (0)