ci(ENG-4207): publish an existing release tag to npm on demand

Merged
HI
1d ago
+44-0

What

Adds a manual workflow_dispatch trigger to release-please.yml that publishes an existing release tag to npm.

Why: when the publish step fails after release-please has cut the release, re-running the job doesn't help. release-please sees the release already exists, reports nothing released, and skips every publish step. That's what happened to defender-v0.9.6.

How: run the workflow from the Actions tab with a tag, e.g. defender-v0.9.6. The new publish-tag job:

  1. checks the input is a release tag (defender-vX.Y.Z);
  2. checks out that tag with LFS (for the models);
  3. checks package.json's version matches the tag;
  4. builds and publishes with the same steps and NPM_TOKEN as the release job.

On a push to main, only the release-please job runs, as before.

šŸ¤– Generated with Claude Code


Summary by cubic

Adds a manual workflow trigger to release-please.yml to publish an existing release tag to npm when the publish step fails after release-please has already cut the release.

  • Re-running the job doesn't help because release-please sees the release already exists and skips publishing.
  • The new publish-tag job checks the tag format, checks out the tag with LFS, verifies package.json matches the tag, then builds and publishes using the same steps and NPM_TOKEN as the release job.
  • On push to main, only the release-please job runs, keeping the existing behavior.