Skip to content

Commit 0643018

Browse files
authored
ci: retry a failed release artifact upload once (#69)
A transient artifact-service timeout on one wheel upload skipped the PyPI publish of 0.9.0. Each upload in publish.yml now continues on error and retries once, overwriting any partial artifact.
1 parent 6e18af6 commit 0643018

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,21 @@ jobs:
118118
- name: Assert native CLI wheel is interpreter-agnostic
119119
shell: bash
120120
run: bash .github/scripts/assert_cli_wheel_tags.sh dist
121-
- uses: actions/upload-artifact@v5
121+
# A transient artifact-service error would otherwise skip the release, so the upload
122+
# retries once, replacing any artifact the failed attempt left behind.
123+
- id: upload-wheel
124+
uses: actions/upload-artifact@v5
125+
continue-on-error: true
122126
with:
123127
name: wheel-${{ matrix.platform.name }}
124128
path: dist
129+
- name: Retry the wheel upload
130+
uses: actions/upload-artifact@v5
131+
if: steps.upload-wheel.outcome == 'failure'
132+
with:
133+
name: wheel-${{ matrix.platform.name }}
134+
path: dist
135+
overwrite: true
125136

126137
sdist:
127138
name: Build sdists and Python wheel
@@ -146,10 +157,21 @@ jobs:
146157
command: sdist
147158
args: --out ../../dist
148159
working-directory: packages/sqlclean-cli
149-
- uses: actions/upload-artifact@v5
160+
# A transient artifact-service error would otherwise skip the release, so the upload
161+
# retries once, replacing any artifact the failed attempt left behind.
162+
- id: upload-sdist
163+
uses: actions/upload-artifact@v5
164+
continue-on-error: true
165+
with:
166+
name: sdist
167+
path: dist
168+
- name: Retry the sdist upload
169+
uses: actions/upload-artifact@v5
170+
if: steps.upload-sdist.outcome == 'failure'
150171
with:
151172
name: sdist
152173
path: dist
174+
overwrite: true
153175

154176
pypi:
155177
name: Publish to PyPI

0 commit comments

Comments
 (0)