fix: avoid duplicate GitHub releases caused by race condition#37
Merged
fix: avoid duplicate GitHub releases caused by race condition#37
Conversation
Replace the matrix release job (4 parallel jobs each creating/uploading to the release) with a single job that downloads all artifacts at once and creates the release with all assets in one gh release create call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Upgrade actions/cache from v3 to v4 - Use github.ref_name instead of env.VER for artifact names (statically known) - Add permissions: contents: write to release job - Remove invalid --no-fail-on-no-commits flag from gh release create - Remove deprecated install: true from setup-buildx-action Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
viviveevee
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Pushing tag
v12.0.0-2026-03-19-04-43triggered the Release workflow and produced two duplicate releases on the GitHub Releases page:The root cause was that the
releasejob used a matrix with 4 entries (x86_64-linux,arm64-linux,arm64-darwin,x86_64-darwin). All 4 jobs ran concurrently and each attempted to create the GitHub Release viasvenstaro/upload-release-action, resulting in a race condition where multiple releases were created for the same tag.Fix
releasejob + separatecreate-releasejob with a singlereleasejob that downloads all 4 artifacts at once (usingpattern+merge-multiple: true) and creates the release with all assets in onegh release createcall.permissions: contents: writeto thereleasejob (required bygh release create).actions/cacheto v4, replaceenv.VERwithgithub.ref_namefor artifact names, remove invalid--no-fail-on-no-commitsflag, remove deprecatedinstall: truefromsetup-buildx-action.Post-merge plan
After this PR is merged:
v12.0.0-2026-03-19-04-43from the remote:The Docker images already published to ghcr.io do not need to be removed — the workflow will overwrite them with the same tags.
🤖 Generated with Claude Code