Skip to content

feat(ci): support branch-based prerelease without managing beta branch#1202

Merged
abueide merged 1 commit intomasterfrom
feat/branch-based-prerelease
Apr 9, 2026
Merged

feat(ci): support branch-based prerelease without managing beta branch#1202
abueide merged 1 commit intomasterfrom
feat/branch-based-prerelease

Conversation

@abueide
Copy link
Copy Markdown
Contributor

@abueide abueide commented Apr 8, 2026

Summary

Replace the beta branch force-push workflow with branch-based prereleases. Any feature branch can now publish prerelease versions without managing or syncing a secondary branch.

Key changes:

  • Remove beta branch force-push step from release workflow
  • Use current branch name for GITHUB_REF instead of hardcoded beta
  • Configure semantic-release to treat any non-master branch as prerelease
  • Update documentation with new fix candidate workflow

Benefits

  • ✅ No branch management or syncing required
  • ✅ Clear traceability: branch name appears in version (e.g., 2.23.0-fix-retry-bug.1)
  • ✅ Multiple fix candidates can exist simultaneously on npm
  • ✅ Each feature branch gets its own npm dist-tag
  • ✅ Simpler mental model: branch = prerelease, master = stable

How it works

Publishing a fix candidate:

  1. Push your feature branch (e.g., fix/customer-issue-123)
  2. Go to Actions → Release workflow → Run workflow
  3. Select your feature branch from dropdown
  4. Choose beta as release type
  5. Workflow publishes with branch name in version: 2.23.0-fix-customer-issue-123.1

Customer installation:

# Install latest from that branch's dist-tag
npm install @segment/analytics-react-native@fix-customer-issue-123

# Or pin to specific version
npm install @segment/analytics-react-native@2.23.0-fix-customer-issue-123.1

Test plan

  • Run dry-run release from feature branch to verify version format
  • Run beta release from feature branch and verify npm publish
  • Verify customer can install using branch dist-tag
  • Confirm multiple feature branches can have simultaneous prereleases

🤖 Generated with Claude Code

Remove beta branch force-push workflow and enable any feature branch to
publish prereleases with branch name as prerelease identifier.

**Changes:**
- Remove beta branch force-push step from release workflow
- Use current branch name for GITHUB_REF instead of hardcoded 'beta'
- Configure semantic-release to treat any non-master branch as prerelease
- Update documentation with new fix candidate workflow

**Benefits:**
- No branch management or syncing required
- Clear traceability: branch name appears in version (e.g., 2.23.0-fix-retry-bug.1)
- Multiple fix candidates can exist simultaneously
- Each feature branch gets its own npm dist-tag

**Usage:**
1. Push feature branch (e.g., fix/customer-issue-123)
2. Run Release workflow from that branch with type 'beta'
3. Customer installs: npm install @segment/analytics-react-native@fix-customer-issue-123

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@abueide abueide force-pushed the feat/branch-based-prerelease branch from fdd6079 to c9fd984 Compare April 8, 2026 20:44
@abueide abueide merged commit 5a4653b into master Apr 9, 2026
7 checks passed
@abueide abueide deleted the feat/branch-based-prerelease branch April 9, 2026 15:50
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.

2 participants