Skip to content

fix(ci): publish workspace packages on the beta dist-tag for prereleases - #2929

Open
keesverruijt wants to merge 1 commit into
SignalK:masterfrom
keesverruijt:fix/publish-workspace-packages-as-beta
Open

fix(ci): publish workspace packages on the beta dist-tag for prereleases#2929
keesverruijt wants to merge 1 commit into
SignalK:masterfrom
keesverruijt:fix/publish-workspace-packages-as-beta

Conversation

@keesverruijt

@keesverruijt keesverruijt commented Aug 8, 2026

Copy link
Copy Markdown
Member

The eight workspace publish steps ran a bare npm publish. npm moves the latest dist-tag on every publish unless --tag says otherwise, and it does so even when the version string is a prerelease — so a beta tag that also bumped a workspace package would publish that package as a normal release. Consumers on a caret range would pick it up on their next install, with no way to opt out and no way to undo it (versions cannot be unpublished after 72 hours, though dist-tags can be moved).

Only the final signalk-server publish handled this, via an inline if on the tag name. That inconsistency within a single job is what made the gap easy to miss.

The channel is now derived once as a job-level NPM_DIST_TAG and passed to all nine publishes, replacing the inline branch so one expression governs the job. --tag latest is npm's own default, so non-beta releases are unchanged.

This matters for the next prerelease specifically: @signalk/server-api has unreleased breaking changes on master (feat(radar-api)!: lean RadarInfo discovery type + RadarsResponse envelope, feat(radar-api)!: drop spokeDataUrl/streamUrl from RadarInfo). Publishing those requires a version bump, which under the current workflow would put them on latest from a beta tag.

Follows the same contains(github.ref, 'beta') convention as the Docker tag gating and releasing.md. Independent of #2928, which covers the fly.io deploy.

🤖 Generated with Claude Code

Summary

This PR updates the CI publish workflow to use the beta npm dist-tag for beta prereleases across all workspace packages, including signalk-server.

The workflow defines NPM_DIST_TAG once at the job level and passes it to all nine npm publish steps. Non-beta releases use npm’s default latest tag.

@github-actions github-actions Bot added the fix label Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2412ddfb-8e5c-413e-b5cc-a298c7f0f235

📥 Commits

Reviewing files that changed from the base of the PR and between 7a6c21d and 2ef90ad.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow now selects beta for beta refs and latest otherwise. It passes this tag explicitly to workspace package and server publish commands.

Changes

Release publishing

Layer / File(s) Summary
Shared npm tag publishing
.github/workflows/release.yml
The workflow defines NPM_DIST_TAG, applies it to workspace package publishes, and uses it for the server publish while retaining the package-existence guard.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: kegustafsson, tkurki

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem and solution clearly but omits the required testing information. Add a How was this tested? section with the verification steps and results.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the CI fix that publishes prerelease workspace packages with the beta dist-tag.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The eight workspace publish steps ran a bare `npm publish`, which moves
the `latest` dist-tag even when the version is a prerelease. A beta tag
that also bumped a workspace package would therefore ship that package
as a normal release, and every consumer on a caret range would pick it
up on the next install.

Derive the channel once as a job-level NPM_DIST_TAG and pass it to all
nine publishes. This also replaces the inline beta branch in the
signalk-server step, so one expression now governs the whole job.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@keesverruijt
keesverruijt force-pushed the fix/publish-workspace-packages-as-beta branch from 2ef90ad to d670716 Compare August 10, 2026 02:28

@tkurki tkurki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The release workflow publishes submodules on demand: if the module is not yet in npm with the stated version it gets published, using the version in its package.json. These are bumped manually currently.

Using server’s tag as the single governing factor we could easily end up in a situation where a module is in beta channel but its version is a regular version.

I think this should include a preflight check that verifies early that all modules that will get published carry beta versions if server is going to be beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants