harden(release): idempotent npm publish + v0.1.1 (DAK-7291)#7
Merged
Conversation
Add version_check step to release.yml: if @dakera-ai/ai-sdk@<version> already exists on npm, the publish step is skipped (no-op success) instead of failing with E404. This makes re-runs safe for already- published versions. Bump to v0.1.1 to cut a verification release via the automated workflow (DAK-7291: confirm NPM_TOKEN scope works end-to-end). Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
release.ymlpublish step had no guard against re-publishing an existing version.npm publishon an already-published version returns E404 (scoped org package not found to update), making re-runs hard-fail.version_checkstep that queriesnpm view @dakera-ai/ai-sdk@<version>before publishing. If already on npm →already_published=true→ publish step is skipped (no-op success).package.json→0.1.1so the automated workflow fires on a fresh version and confirms NPM_TOKEN scope is correct end-to-end.Changes
.github/workflows/release.yml—version_checkstep + conditionalif:on publish steppackage.json/package-lock.json— version0.1.0→0.1.1Test plan
v0.1.1→Publish to npmworkflow fires → confirm greennpm info @dakera-ai/ai-sdk versionreturns0.1.1Closes DAK-7291
🤖 Generated with Claude Code