-
Notifications
You must be signed in to change notification settings - Fork 0
Use release branches #28
Copy link
Copy link
Closed
Labels
refactorA code change (src or test) that neither fixes a bug nor adds a featureA code change (src or test) that neither fixes a bug nor adds a feature
Description
Use a release branch that aggregates multiple merged feature PRs, then run your semantic-versioner once on that branch to produce a single bump based on the combined commits. Use conventional commit markers / labels so the versioner sees feature vs. fix vs. breaking-change intent for all included PRs.
How to do it (practical steps)
- Enforce conventional commits or PR labels (feat/, fix/, BREAKING CHANGE, or custom labels like include-in-release).
- Merge feature PRs into a release branch (e.g., release/x.y or main) OR create a “release PR” that gathers selected feature PRs.
- Run semantic-version once on that branch/PR (not per-feature). Configure the action to evaluate the entire set of commits, not each commit individually. Key settings:
- bump_each_commit: false (don’t increment per commit)
- search_commit_body: true (look for patterns in PR bodies)
- use commit/PR labels or conventional commit prefixes to mark major/minor/patch
- Produce changelog from the combined commits/PRs and create the single release tag (vX.Y.Z) and release notes.
- Build artifacts from that tagged commit and publish.
CI config hints
- Use a manual release trigger (workflow_dispatch) or run only on merge of the release branch so the pipeline runs once for the aggregate, not per-feature.
Example semantic-version step (paulhatch action)
- name: Determine version
uses: paulhatch/semantic-version@v5.4.0
with:
tag_prefix: "v"
major_pattern: "(MAJOR)|BREAKING CHANGE|!:"
minor_pattern: "(MINOR)|^feat:"
change_path: "src"
search_commit_body: true
bump_each_commit: falseExample workflow pattern (concept)
- Developers merge feature PRs into a release branch or create a release PR that merges multiple features.
- Trigger semantic-version once on that branch (or via workflow_dispatch).
- Update Cargo.toml, create tag vX.Y.Z, generate changelog, build & publish artifacts.
Why this works
- Calculating version from the aggregate commit set ensures the bump reflects the most significant change among all included PRs (major > minor > patch).
- Prevents per-PR tiny releases and ensures a single coherent release containing multiple features.
Keep it minimal
- Don’t run semantic-version per feature. Run it once per release branch / manual dispatch, and use bump_each_commit=false so the tool computes the correct single bump for the whole release.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
refactorA code change (src or test) that neither fixes a bug nor adds a featureA code change (src or test) that neither fixes a bug nor adds a feature