Skip to content

Commit ecbc533

Browse files
adhikjoshiclaude
andauthored
Let a release retry overwrite the assets it already uploaded (#9)
The v0.2.0 retry got past the tap credentials and then died on the upload: upload failed error=POST .../releases/385736691/assets?name=modelslab_0.2.0_linux_arm64.tar.gz: 422 Validation Failed [{Resource:ReleaseAsset Field:name Code:already_exists}] ...once for each of the 11 assets the first, half-failed run had already attached, and npm and PyPI were skipped again behind it. `release.mode: replace` was the wrong lever. It governs the release NOTES; it says nothing about artifacts. `replace_existing_artifacts` is the half that overwrites them, and without it no retry of a run that got as far as uploading can ever succeed — which is exactly the situation the retry exists for. Verified locally end to end against a snapshot build: goreleaser check passes, 6 binaries collected (the count the workflow asserts), packaging/npm/build.mjs produces the 6 platform packages plus the entry package pinning them, and packaging/pypi/build.py produces the 6 wheels, all stamped 0.2.0. Claude-Session: https://claude.ai/code/session_01QgkQePXPha8ShvoBerrVXL Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 4aec03c commit ecbc533

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.goreleaser.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@ checksum:
3838
name_template: "checksums.txt"
3939

4040
release:
41-
# Re-running a release must be safe. The default `keep-existing` leaves a
42-
# half-published release from a failed run in place, so the retry cannot
43-
# correct it; `replace` makes the tag's assets match whatever this run built.
41+
# Re-running a release must be safe.
42+
#
43+
# `mode` governs the release NOTES only — it does nothing about artifacts, and
44+
# the v0.2.0 retry died proving it: every upload came back
45+
# `422 already_exists` against the assets the first, half-failed run had
46+
# already attached. replace_existing_artifacts is the half that actually
47+
# overwrites them.
4448
mode: replace
49+
replace_existing_artifacts: true
4550

4651
snapshot:
4752
version_template: "{{ incpatch .Version }}-next"

0 commit comments

Comments
 (0)