@@ -4,22 +4,87 @@ Title: GitHubFlow Examples
4
4
RedirectFrom : docs/git-branching-strategies/githubflow-examples
5
5
---
6
6
7
- ## Feature branch
7
+ These examples are illustrating the usage of the supported ` GitHubFlow ` workflow
8
+ in GitVersion. To enable this workflow, the builtin template
9
+ [ GitHubFlow/v1] ( /docs/workflows/GitHubFlow/v1.json ) needs to be referenced in the
10
+ configuration as follows:
11
+ ``` yaml
12
+ workflow : GitHubFlow/v1
13
+ mode : ContinuousDelivery
14
+ ` ` `
8
15
9
- ![ GitHubFlow] ( /docs/img/githubflow_feature-branch.png )
16
+ Where
17
+ the [continuous deployment][continuous-deployment] mode for no branches,
18
+ the [continuous delivery][continuous-delivery] mode for
19
+ ` main` branch and
20
+ the [manual deployment][manual-deployment] mode
21
+ for `release`, `feature` and `unknown` branches are specified.
10
22
11
- ## Pull requests
23
+ This configuration allows you to publish CI (Continuous Integration) builds
24
+ from `main` branch to an artifact repository.
25
+ All other branches are manually published. Read more about this at
26
+ [version increments](/docs/reference/version-increments).
12
27
13
- ![ GitHubFlow] ( /docs/img/githubflow_pull-request.png )
28
+ :::{.alert .alert-info}
29
+ The _continuous delivery_ mode has been used for the `main` branch in this
30
+ examples (specified as a fallback on the root
31
+ configuration layer) to illustrate how the version increments are applied.
32
+ In production context the _continuous deployment_ mode might be a better
33
+ option when e.g. the release process is automated or the commits are tagged
34
+ by the pipeline automatically.
35
+ :: :
14
36
15
- ## Release branch
37
+ # # Feature Branch
16
38
17
- Release branches can be used in GitHubFlow as well as GitFlow. Sometimes you
39
+ Feature branches can be used in the `GitHubFlow` workflow to implement a
40
+ feature or fix a bug in an isolated environment. Feature branches will take
41
+ the feature
42
+ branch name and use that as the pre-release label. Feature branches will be
43
+ created from a `main` or `release` branch.
44
+
45
+ # ## Create feature branch from main
46
+
47
+ 
48
+
49
+ :::{.alert .alert-info}
50
+ After the feature branch is merged, the version on `main` is `2.0.0-5`.
51
+ This is due to `main` running in _continuous delivery_ mode. If `main` was
52
+ configured to use _continuous deployment_ the version would be `2.0.0`.
53
+ :: :
54
+
55
+ # # Release Branches
56
+
57
+ Release branches are used for major and minor releases to stabilize a RC
58
+ (Release Candidate) or to integrate features (in parallel) targeting different
59
+ iterations. Release branches are taken from `main` and will
60
+ be merged back afterwards. Finally the `main` branch is tagged with the
61
+ released version.
62
+
63
+ Release branches can be used in the `GitHubFlow` as well as `GitFlow` workflow.
64
+ Sometimes you
18
65
want to start on a large feature which may take a while to stabilize so you want
19
66
to keep it off main. In these scenarios you can either create a long lived
20
67
feature branch (if you do not know the version number this large feature will go
21
68
into, and it's non-breaking) otherwise you can create a release branch for the
22
69
next major version. You can then submit pull requests to the long lived feature
23
70
branch or the release branch.
24
71
25
- ![ GitFlow] ( /docs/img/githubflow_release-branch.png )
72
+ # ## Create release branch
73
+
74
+ 
75
+
76
+ # ## Create release branch with version
77
+
78
+ 
79
+
80
+ # # To Contribute
81
+
82
+ See [contributing examples](/docs/learn/branching-strategies/contribute-examples).
83
+
84
+ # ## Source
85
+
86
+ See `DocumentationSamplesForGitHubFlow.cs`. To update, modify then run test.
87
+
88
+ [continuous-deployment] : /docs/reference/modes/continuous-deployment
89
+ [continuous-delivery] : /docs/reference/modes/continuous-delivery
90
+ [manual-deployment] : /docs/reference/modes/manual-deployment
0 commit comments