Skip to content

Commit 1719bc2

Browse files
committed
simplify skips for cancellation; no need to fail step spuriously
1 parent e230895 commit 1719bc2

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/conda-build.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ jobs:
182182
continue-on-error: true
183183
id: prepare-artifacts
184184
shell: bash
185-
if: ${{ always() }}
185+
# we do not want to trigger artefact creation if the build was cancelled
186+
if: ${{ steps.determine-status.outputs.status != 'cancelled' }}
186187
env:
187188
CONFIG: ${{ matrix.CONFIG }}
188189
SHORT_CONFIG: ${{ matrix.SHORT_CONFIG }}
@@ -211,17 +212,10 @@ jobs:
211212
else
212213
export BLD_ARTIFACT_PREFIX="conda_pkgs"
213214
fi
214-
# we do not want to trigger artefact creation if the job is cancelled;
215-
# gate this on either explicit success or failure
216-
if [ $JOB_STATUS != "cancelled" ]; then
217-
if [ $OS == "windows" ]; then
218-
cmd.exe /c .scripts\\create_conda_build_artifacts.bat
219-
else
220-
./.scripts/create_conda_build_artifacts.sh
221-
fi
215+
if [ $OS == "windows" ]; then
216+
cmd.exe /c .scripts\\create_conda_build_artifacts.bat
222217
else
223-
# skips upload steps below, which are gated on preparation success
224-
exit 1
218+
./.scripts/create_conda_build_artifacts.sh
225219
fi
226220
227221
- name: Store conda build artifacts

0 commit comments

Comments
 (0)