fix(ci): make npm publish idempotent in inlined widget workflow#155
Merged
fix(ci): make npm publish idempotent in inlined widget workflow#155
Conversation
Same fix as Marketrix-ai/infra#47 but for widget's inlined ci.yml (widget can't use the reusable due to public→private cross-repo restriction). Sync-tagging an unchanged widget doesn't bump package.json, so the version on disk equals the version already published on npm. The publish step previously failed with `cannot publish over previously published versions`, turning the whole CI run red — that's exactly what happened on the v3.3.179 release and why widget had to be omitted from the deploy inputs. One `npm view` lookup before publish; skip with exit 0 if the (name, version) is already on the registry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #156
Mirror of infra#47 for widget's inlined
ci.yml(widget can't use the reusable due to the public→private cross-repo restriction).The bug
Sync-tagging an unchanged widget doesn't bump
package.json, so the version on disk equals the version already published on npm. The publish step previously failed withcannot publish over previously published versions, turning the whole CI run red — exactly what happened on the v3.3.179 release.Fix
One
npm viewlookup beforenpm publish; skip withexit 0if the (name, version) is already on the registry. Idempotent for sync-tags; unchanged for genuine widget releases.Test plan