Skip to content

Commit 1175d57

Browse files
facontidavideclaude
andcommitted
Fix conda upload: try without --force first, fallback to --force
The --force flag causes prefix.dev to return 500 "Package version does not exist" on first upload of a new version. Upload without --force first (works for new versions), then retry with --force (works for re-uploads of existing versions). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: e95a79181772
1 parent fc20aa1 commit 1175d57

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/conda.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,12 @@ jobs:
8282
shell: bash
8383
run: |
8484
shopt -s nullglob globstar
85+
EXIT_CODE=0
8586
for pkg in artifacts/**/*.conda artifacts/**/*.tar.bz2; do
8687
echo "Uploading ${pkg}"
87-
rattler-build upload prefix --force -c plotjuggler "${pkg}" || \
88-
echo "::warning::Failed to upload ${pkg} (may already exist on prefix.dev)"
88+
if ! rattler-build upload prefix -c plotjuggler "${pkg}" && \
89+
! rattler-build upload prefix --force -c plotjuggler "${pkg}"; then
90+
EXIT_CODE=1
91+
fi
8992
done
93+
exit $EXIT_CODE

0 commit comments

Comments
 (0)