@@ -344,13 +344,26 @@ jobs:
344344 "${python[@]}" -c 'import sqlquack
345345 result = sqlquack.convert(sql="SELECT 1 AS total", options=sqlquack.ConvertOptions(no_config=True))
346346 assert result.sql == "SELECT CAST(1 AS DECIMAL(1, 0)) AS \"TOTAL\"", result.sql'
347- - uses : actions/upload-artifact@v4
347+ # A transient network error in the upload would otherwise cost the whole build, so it retries
348+ # once, replacing any artifact the failed attempt left behind.
349+ - id : upload-wheel
350+ uses : actions/upload-artifact@v4
348351 if : inputs.upload
352+ continue-on-error : true
349353 with :
350354 name : dist-wheel-${{ matrix.platform.name }}
351355 path : dist
352356 if-no-files-found : error
353357 retention-days : ${{ inputs.retention-days }}
358+ - name : Retry the wheel upload
359+ uses : actions/upload-artifact@v4
360+ if : inputs.upload && steps.upload-wheel.outcome == 'failure'
361+ with :
362+ name : dist-wheel-${{ matrix.platform.name }}
363+ path : dist
364+ if-no-files-found : error
365+ retention-days : ${{ inputs.retention-days }}
366+ overwrite : true
354367
355368 sdist :
356369 name : Build sdists
@@ -391,13 +404,26 @@ jobs:
391404 exit 1
392405 fi
393406 done
394- - uses : actions/upload-artifact@v4
407+ # A transient network error in the upload would otherwise cost the whole build, so it retries
408+ # once, replacing any artifact the failed attempt left behind.
409+ - id : upload-sdist
410+ uses : actions/upload-artifact@v4
395411 if : inputs.upload
412+ continue-on-error : true
396413 with :
397414 name : dist-sdist
398415 path : dist
399416 if-no-files-found : error
400417 retention-days : ${{ inputs.retention-days }}
418+ - name : Retry the sdist upload
419+ uses : actions/upload-artifact@v4
420+ if : inputs.upload && steps.upload-sdist.outcome == 'failure'
421+ with :
422+ name : dist-sdist
423+ path : dist
424+ if-no-files-found : error
425+ retention-days : ${{ inputs.retention-days }}
426+ overwrite : true
401427
402428 manifest :
403429 name : Record distribution source
@@ -416,9 +442,22 @@ jobs:
416442 '{sha: $sha, tree: $tree, run_id: $run_id}' \
417443 > "${RUNNER_TEMP}/release-manifest.json"
418444 cat "${RUNNER_TEMP}/release-manifest.json"
419- - uses : actions/upload-artifact@v4
445+ # A transient network error in the upload would otherwise cost the whole build, so it retries
446+ # once, replacing any artifact the failed attempt left behind.
447+ - id : upload-manifest
448+ uses : actions/upload-artifact@v4
449+ continue-on-error : true
450+ with :
451+ name : release-manifest
452+ path : ${{ runner.temp }}/release-manifest.json
453+ if-no-files-found : error
454+ retention-days : ${{ inputs.retention-days }}
455+ - name : Retry the manifest upload
456+ uses : actions/upload-artifact@v4
457+ if : steps.upload-manifest.outcome == 'failure'
420458 with :
421459 name : release-manifest
422460 path : ${{ runner.temp }}/release-manifest.json
423461 if-no-files-found : error
424462 retention-days : ${{ inputs.retention-days }}
463+ overwrite : true
0 commit comments