dotnet / dotnet/Nerdbank.GitVersioning

How to setup for Github Flow?

Open
#1,292 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.6k
Forks
185
Avg merge
1d 1h
Merged PRs (30d)
46

Description

I'm evaluating NerdBank.Gitversioning for use in a monorepo using the [GitHub Flow](https://medium.com/@yanminthwin/understanding-github-flow-and-git-flow-957bc6e12220) branching and merging strategy. The key points for GitHub Flow are (apologies for restating known information):

- The **master** branch is always deployable and represents the latest stable version of the code.
- Developers create **feature branches** for each new feature or bug fix whenever new changes are required. These branches are isolated from the master until they are ready for review.
- After completing work in a feature branch, developers open **pull requests** to initiate code review and discussion.
- Once a pull request is approved, **changes are merged** into the master branch and **automatically deployed to production**.

This seems to work backwards from out-of-the-box functionality of NerdBank.Gitversioning (unless I'm missing something), where:
- The **master** branch is **not** deployable and represents the working version of the code.
- Developers create **feature branches** for each new feature or bug fix whenever new changes are required. These branches are isolated from the master until they are ready for review.
- After completing work in a feature branch, developers open **pull requests** to initiate code review and discussion.
- Once a pull request is approved, **changes are merged** into the master branch, but are **not automatically deployed to production**.
- Once the state of the master branch is considered deployable, a **release branch** is created using ```nbgv prepare-release```. This branch is named and tagged according to the settings in version.json, and the master branch version.json is iterated to the next version number. The release branch can be **automatically deployed** to production.

I like the tool, but would like to keep the SDLC process as similar as possible to current practices. My question is, is it possible to configure NerdBank.Gitversioning to work more inline with traditional GitHub Flow? If so, what would the version.json file look like? Are there any changes necessary to make it work for a monorepo?

Contributor guide

Open the contributing guide

Research direction

Start with the version.json configuration and the nbgv prepare-release workflow described in the issue. Determine whether GitHub Flow and monorepo support can be configured with the existing release process, then document the required settings and any limitations so users can follow the workflow without creating an unsuitable release branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github
Domain
release
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.