Skip to content

fix(ci): override GITHUB_REF for beta + remove @semantic-release/git#1142

Open
abueide wants to merge 2 commits intomasterfrom
fix/npm-workspace-protocol
Open

fix(ci): override GITHUB_REF for beta + remove @semantic-release/git#1142
abueide wants to merge 2 commits intomasterfrom
fix/npm-workspace-protocol

Conversation

@abueide
Copy link
Contributor

@abueide abueide commented Mar 3, 2026

Summary

Fix beta branch detection:

  • Override GITHUB_REF=refs/heads/beta in the beta release step
  • semantic-release uses env-ci which reads GITHUB_REF to detect the branch. Since workflow_dispatch runs from master, GITHUB_REF was refs/heads/master even after git checkout -B beta, causing beta releases to publish as stable versions instead of prereleases

Remove @semantic-release/git:

  • Eliminates need to push version bump commits to protected branches
  • Add sync-versions devbox command to pull npm versions into package.json on demand
  • Update wiki/release.md

Damage from previous beta run

Two packages were accidentally published as stable (not beta) before the crash:

  • @segment/analytics-react-native@2.22.0 (published to @latest)
  • @segment/analytics-react-native-plugin-amplitude-session@0.4.2 (published to @latest)

These may need to be addressed separately (deprecate, or accept as stable releases).

Test plan

  • Merge and run beta release
  • Verify packages publish with -beta.X suffix and @beta dist-tag

🤖 Generated with Claude Code

abueide and others added 2 commits March 2, 2026 20:43
Remove the @semantic-release/git plugin which pushes version bump
commits and CHANGELOG.md back to the branch. The default github.token
cannot push to protected branches, and this avoids the need for a PAT.

Version source of truth is git tags + npm registry. Add a
sync-versions devbox command to pull latest npm versions into
package.json on demand. Update release docs accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
semantic-release uses env-ci which reads GITHUB_REF to determine the
current branch. Since workflow_dispatch runs from master, GITHUB_REF
is refs/heads/master even after git checkout -B beta. This caused beta
releases to publish as stable versions instead of prereleases.

Override GITHUB_REF=refs/heads/beta in the beta release step so
semantic-release correctly detects the beta branch and publishes
prerelease versions with the @beta dist-tag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant