Skip to content

fix(release): unblock npm publish — remove broken kit install, add payment ext#101

Merged
jamesnrokt merged 1 commit into
mainfrom
chore/fix-release-npm-workflow
Jun 12, 2026
Merged

fix(release): unblock npm publish — remove broken kit install, add payment ext#101
jamesnrokt merged 1 commit into
mainfrom
chore/fix-release-npm-workflow

Conversation

@jamesnrokt

@jamesnrokt jamesnrokt commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Context

The 4.0.0 release (run) partially published: @mparticle/cordova-sdk@4.0.0 reached npm, then the workflow failed at "Install Rokt Kit dependencies". The Rokt kit never published, and no git tag or GitHub release was created.

Root cause

release-from-main.yml ran npm ci in Kits/Rokt. npm ci requires a package-lock.json. That lock file was intentionally removed (the kits are dependency-less and carry no lock), so npm ci failed with EUSAGE.

Changes

  1. Remove the Rokt kit install step entirely. The kits have no dependencies and no lifecycle scripts, so npm publish packs and uploads on its own — there is nothing to install. (The npm ci was cargo-culted from the plugin's step, where it is needed to run tests + build.)
  2. Add the Kits/RoktPaymentExtension publish step. It's new in 4.0.0 with publishConfig, but the workflow had no step for it, so it was never published to npm.

Recovery plan

We will not re-run 4.0.0. Roll forward to 4.0.1 through the normal flow:

  1. Merge this PR (workflow-only — does not touch VERSION, so it won't trigger a release).
  2. Dispatch draft-release-publish.yml with a patch bump → opens the 4.0.1 release PR.
  3. Merge that PR → VERSION changes → release-from-main.yml publishes all three packages at 4.0.1 and cuts tag 4.0.1 + the GitHub release.

🤖 Generated with Claude Code

@jamesnrokt jamesnrokt requested a review from a team as a code owner June 12, 2026 15:25
Copilot AI review requested due to automatic review settings June 12, 2026 15:25
@cursor

cursor Bot commented Jun 12, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes production release automation and npm publish behavior; mistakes could affect which packages ship or how tags/releases are updated, though idempotent skips reduce duplicate-publish risk.

Overview
Repairs the Release NPM workflow so a failed 4.0.0 run can be finished without republishing packages that already shipped.

Rokt kits now use npm install instead of npm ci, matching lockless kit packages. Install + publish steps were added for Kits/RoktPaymentExtension, which the release path had never published. Every npm publish step is idempotent: it checks the registry and skips when that exact version already exists.

The workflow can be started manually via workflow_dispatch, and the GitHub release step sets allowUpdates: true so re-runs can update an existing release/tag.

Reviewed by Cursor Bugbot for commit a8df4db. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release workflow to safely recover from the partially-published 4.0.0 release by enabling manual reruns, making npm publishes idempotent, and ensuring the Rokt kit(s) can install/publish without requiring lockfiles.

Changes:

  • Add workflow_dispatch and set GitHub release creation to allowUpdates: true for safe reruns.
  • Make npm publishes idempotent by skipping packages whose exact version is already on npm.
  • Switch Kits/Rokt from npm ci to npm install, and add install/publish steps for Kits/RoktPaymentExtension.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-from-main.yml Outdated
Comment thread .github/workflows/release-from-main.yml Outdated
@jamesnrokt jamesnrokt marked this pull request as draft June 12, 2026 15:30
@jamesnrokt jamesnrokt changed the title fix(release): unblock 4.0.0 publish — npm install for lockless kits, add payment ext, idempotent publishes fix(release): unblock publish — npm install for lockless kits, add payment ext, idempotent publishes Jun 12, 2026
@jamesnrokt jamesnrokt changed the title fix(release): unblock publish — npm install for lockless kits, add payment ext, idempotent publishes fix(release): unblock publish — drop unneeded kit install, add payment ext Jun 12, 2026
…yment ext

The Release NPM workflow ran `npm ci` in Kits/Rokt, which requires a
package-lock.json. The kits are dependency-less and carry no lock file, so
`npm ci` failed with EUSAGE and the 4.0.0 release published the plugin but
not the Rokt kit, and created no tag or GitHub release.

The kits have no dependencies and no lifecycle scripts, so `npm publish`
packs and uploads on its own — no install step is needed. Remove the Rokt
kit install step entirely (rather than swapping `npm ci` for `npm install`),
and add the missing RoktPaymentExtension publish step (new in 4.0.0, with
publishConfig, but never published because the workflow had no step for it).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jamesnrokt jamesnrokt force-pushed the chore/fix-release-npm-workflow branch from f5de2b9 to 3232427 Compare June 12, 2026 15:40
@jamesnrokt jamesnrokt marked this pull request as ready for review June 12, 2026 15:41
@jamesnrokt jamesnrokt changed the title fix(release): unblock publish — drop unneeded kit install, add payment ext fix(release): unblock npm publish — remove broken kit install, add payment ext Jun 12, 2026
@jamesnrokt jamesnrokt merged commit 8a6c7d9 into main Jun 12, 2026
9 of 10 checks passed
@jamesnrokt jamesnrokt deleted the chore/fix-release-npm-workflow branch June 12, 2026 18:34
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.

3 participants