You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ci): support branch-based prerelease without managing beta branch (#1202)
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>
Copy file name to clipboardExpand all lines: wiki/release.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Release guide
2
2
3
-
This repo uses semantic-release with multi-semantic-release to version and publish all public workspaces. Tags follow `${name}-v${version}` and releases are cut from `master` (stable) and `beta` (prerelease).
3
+
This repo uses semantic-release with multi-semantic-release to version and publish all public workspaces. Tags follow `${name}-v${version}` and releases are cut from `master` (stable) or any feature branch (prerelease).
4
4
5
5
### Prerequisites
6
6
@@ -16,10 +16,22 @@ This repo uses semantic-release with multi-semantic-release to version and publi
16
16
17
17
### CI/CD path (recommended)
18
18
19
-
1. Ensure `master`/`beta` are green. Merges must use conventional commits.
20
-
2. Trigger `Release` workflow in Actions. Choose type: `dry-run`, `beta`, or `production`.
19
+
1. Ensure target branch is green. Merges must use conventional commits.
20
+
2. Trigger `Release` workflow in Actions:
21
+
-**Production release**: Run from `master` with type `production` → publishes stable versions (e.g., `2.23.0`)
22
+
-**Fix candidate/beta**: Run from any feature branch with type `beta` → publishes prerelease versions (e.g., `2.23.0-fix-retry-bug.1`)
23
+
-**Dry run**: Run from any branch with type `dry-run` to preview what would be published
21
24
3. Outputs: package tags (`${name}-vX.Y.Z`), npm publishes, and GitHub releases.
22
25
26
+
**Beta/fix candidate workflow:**
27
+
28
+
- Push your feature branch (e.g., `fix/customer-issue-123`)
29
+
- Run Release workflow from that branch with type `beta`
30
+
- Publishes with branch name in version: `2.23.0-fix-customer-issue-123.1`
Note: version bumps and changelogs are **not** committed back to the repo. The source of truth for versions is the git tags and npm registry. To sync the repo's `package.json` versions with npm, run `devbox run --config=shells/devbox-fast.json sync-versions` and include the changes in a PR.
24
36
25
37
### Local dry run
@@ -31,6 +43,7 @@ Note: version bumps and changelogs are **not** committed back to the repo. The s
31
43
32
44
- Only public packages release; private workspaces (e.g., `packages/shared`) are ignored.
33
45
- Tag pattern is important: keep `${name}-v${version}` if you create manual tags for debugging.
34
-
-If adding a new branch for releases, update both `release.config.js` and `multi-release.config.js`.
46
+
-Branch name becomes part of prerelease identifier: use descriptive branch names (e.g., `fix/retry-logic` not `fix123`).
35
47
- Keep yarn.lock in sync before releasing to avoid install differences between CI and local.
36
48
-`.npmrc` contains `workspaces-update=false` to prevent `npm version` from failing on Yarn's `workspace:` protocol.
49
+
- Multiple fix candidates can coexist on npm simultaneously with different dist-tags.
0 commit comments