Skip to content

fix(release): set channel for release/* and hotfix/* branches#586

Merged
cwillisf merged 1 commit into
developfrom
fix/release-channel-prefix
May 22, 2026
Merged

fix(release): set channel for release/* and hotfix/* branches#586
cwillisf merged 1 commit into
developfrom
fix/release-channel-prefix

Conversation

@cwillisf
Copy link
Copy Markdown
Contributor

Summary

  • semantic-release defaults nextRelease.channel to the matched branch name when no explicit channel is set. For a branch like release/UEPR-297-accessibility-improvements that put a / in the npm dist-tag passed to npm publish --tag, and the registry rejected it with 404 Not Found.
  • Add a matching channel template to the release/* and hotfix/* branch configs that mirrors the existing prerelease template (strip the release/ or hotfix/ prefix from ${name}).
  • Factor the shared template into a stripPrefix helper so the two fields can't drift.

The published version (13.8.0-UEPR-297-accessibility-improvements.1) was already correct because the prerelease template was in place — only the channel needed fixing. This is the first time the publish workflow has been exercised from a release/* branch, so the gap wasn't visible until now.

The currently-blocked release branch will need this cherry-picked (or develop merged into it) before retrying its publish.

Test plan

  • Re-run the publish workflow on release/UEPR-297-accessibility-improvements (after picking up this fix) and confirm npm publish succeeds with dist-tag UEPR-297-accessibility-improvements.
  • Confirm the published package is installable via npm install @scratch/scratch-svg-renderer@UEPR-297-accessibility-improvements.

semantic-release defaults nextRelease.channel to the matched branch name
when no explicit channel is set. For a branch like
release/UEPR-297-accessibility-improvements that put a '/' in the npm
dist-tag, and npm publish rejected it with 404 Not Found.

Apply the same prefix-stripping template that prerelease already used,
via a small helper so the two fields can't drift.
@cwillisf cwillisf requested a review from a team as a code owner May 22, 2026 20:07
@cwillisf cwillisf requested a review from Copilot May 22, 2026 20:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repo’s semantic-release configuration to ensure release/* and hotfix/* branches publish with a valid npm dist-tag (channel) by stripping the branch prefix, avoiding / characters that npm rejects.

Changes:

  • Add an explicit channel template for release/* and hotfix/* branches to prevent npm dist-tag generation from including /.
  • Factor the shared “strip prefix from ${name}” logic into a stripPrefix helper and reuse it for both channel and prerelease.

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

@cwillisf cwillisf merged commit d511d3e into develop May 22, 2026
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants