Skip to content

harden(release): idempotent npm publish + v0.1.1 (DAK-7291)#7

Merged
ferhimedamine merged 1 commit into
mainfrom
fix/dak-7291-npm-publish-idempotent
Jul 2, 2026
Merged

harden(release): idempotent npm publish + v0.1.1 (DAK-7291)#7
ferhimedamine merged 1 commit into
mainfrom
fix/dak-7291-npm-publish-idempotent

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

  • Root cause: release.yml publish step had no guard against re-publishing an existing version. npm publish on an already-published version returns E404 (scoped org package not found to update), making re-runs hard-fail.
  • Fix: Added version_check step that queries npm view @dakera-ai/ai-sdk@<version> before publishing. If already on npm → already_published=true → publish step is skipped (no-op success).
  • Verification bump: package.json0.1.1 so the automated workflow fires on a fresh version and confirms NPM_TOKEN scope is correct end-to-end.

Changes

  • .github/workflows/release.ymlversion_check step + conditional if: on publish step
  • package.json / package-lock.json — version 0.1.00.1.1

Test plan

  • CI must be green on this PR
  • After merge: create GitHub release v0.1.1Publish to npm workflow fires → confirm green
  • npm info @dakera-ai/ai-sdk version returns 0.1.1

Closes DAK-7291

🤖 Generated with Claude Code

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>
@ferhimedamine ferhimedamine added the auto-merge CTO auto-merges when CI is green label Jul 2, 2026
@ferhimedamine ferhimedamine merged commit 72bbb1d into main Jul 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge CTO auto-merges when CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant