Skip to content

ci: wait for npm before the registry publish; run the release workflow for an existing tag - #223

Merged
bompus merged 1 commit into
mainfrom
release-workflow-fix-20261030
Oct 30, 2026
Merged

bompus merged 1 commit into
mainfrom
release-workflow-fix-20261030

Conversation

@bompus

@bompus bompus commented Oct 30, 2026

Copy link
Copy Markdown
Owner

The 0.8.0 release run published to npm and then stopped at the MCP registry step: npm did not show 0.8.0 yet, and the registry checks the npm package when it validates the entry (run). npm showed the version about 53 seconds later. This PR fixes that and lets the fixed workflow finish the existing tag.

Changes to .github/workflows/release.yml

  • npm publish is skipped when npm view swarmail-mcp@<version> already shows the version.
  • A new step waits about 5 minutes for npm to show the version (polling every 10 s, each npm view capped at 30 s) and fails with an error naming the package and version. It runs before the registry publish. This is the skip-and-wait pattern bompus/codegraph's release workflow already uses.
  • workflow_dispatch takes a required tag input. A tag's own release.yml is the copy from its commit, so re-running a failed tag run cannot pick up this fix; the workflow has to run on main and check out the tag. The check job requires the run to be on main, the tag to equal v plus the package.json version, and the checked-out commit to be in main's history. It passes that commit's SHA to publish, which checks out exactly that SHA, so moving the tag mid-run cannot change what gets published. Push-triggered runs behave as before.
  • gh release create uses $TAG.

CONTRIBUTING.md step 3 says how to run the workflow again for a tag, and not to use "Re-run failed jobs".

Review. An independent non-Anthropic review walked the one planned dispatch for v0.8.0 (npm already has it, the registry has 0.7.2, no GitHub release) and found no blocker there. It raised two things, both fixed here: the publish job re-resolved the tag instead of using the commit the check job validated, and the "5 minutes" claim was not enforced when npm view hung. actionlint reports only that it does not know the documented queue concurrency key, which GitHub accepted on the real run. The loop's timeout path was exercised locally against the real registry (exit 1 with the error line).

Not verified until the dispatch: the registry publish after the wait, and the GitHub release step.

…flow run for an existing tag

The v0.8.0 run published to npm, then failed at the MCP registry because npm did not
show the version yet (it appeared about a minute later). After npm publish the workflow
now waits up to 5 minutes for the version to show, as the codegraph release workflow
does, and skips npm publish for a version npm already has.

A tag's own release.yml is the copy from its commit, so a fix cannot reach an existing
tag by re-running it. workflow_dispatch takes a tag input, runs on main, checks out that
tag and applies the same guards: the tag equals v plus the package.json version and its
commit is on main. CONTRIBUTING.md describes the recovery run.
@bompus bompus added the author:anthropic Changes authored with an Anthropic model; select an independent reviewer label Oct 30, 2026
@bompus

bompus commented Oct 30, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bompus AI Review (GPT-6.1 Sol, xhigh reasoning): 0 finding(s).

@bompus
bompus merged commit 2849990 into main Oct 30, 2026
2 checks passed
@bompus
bompus deleted the release-workflow-fix-20261030 branch October 30, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:anthropic Changes authored with an Anthropic model; select an independent reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant