Skip to content

fix(ci): make npm publish idempotent in inlined widget workflow#155

Merged
yasithdev merged 1 commit intodevfrom
fix-idempotent-npm-publish
May 5, 2026
Merged

fix(ci): make npm publish idempotent in inlined widget workflow#155
yasithdev merged 1 commit intodevfrom
fix-idempotent-npm-publish

Conversation

@yasithdev
Copy link
Copy Markdown
Member

@yasithdev yasithdev commented May 5, 2026

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 with cannot publish over previously published versions, turning the whole CI run red — exactly what happened on the v3.3.179 release.

Fix

One npm view lookup before npm publish; skip with exit 0 if the (name, version) is already on the registry. Idempotent for sync-tags; unchanged for genuine widget releases.

Test plan

  • Sync-tagging widget at the same package.json version produces a green run with "Already on registry — skipping".
  • Genuine release with version bump still publishes.

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>
@yasithdev yasithdev requested a review from a team May 5, 2026 05:57
@yasithdev yasithdev merged commit 119803a into dev May 5, 2026
4 checks passed
@yasithdev yasithdev deleted the fix-idempotent-npm-publish branch May 5, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): make npm publish idempotent in inlined widget workflow

1 participant