-
Notifications
You must be signed in to change notification settings - Fork 769
Expand file tree
/
Copy pathGitVersion.yml
More file actions
97 lines (88 loc) · 3.28 KB
/
GitVersion.yml
File metadata and controls
97 lines (88 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# This file configures GitVersion 6.x to work with Terminal.Gui's GitFlow branching strategy.
#
# Terminal.Gui uses the GitFlow branching strategy.
# https://gitversion.net/docs/learn/branching-strategies/gitflow/
#
# - We have two main branches: `main` and `develop`.
# - `main` is the main branch for V2 releases and matches the latest NuGet release package (e.g., 2.0.0);
# prior to release, it uses pre-release labels (e.g., 2.0.0-prealpha.1).
# - `develop` is the development branch for V2 and always carries a pre-release label (e.g., 2.1.0-develop.1).
# - Development happens on feature branches off `develop`.
# - For releases, we merge feature branches into `develop`, then `develop` into `main`.
# - The ./.github/workflows/publish.yml builds and publishes on pushes to `develop` and `main`.
#
# Branches:
# - v1_release: Main branch for V1 (historical)
# - v1_develop: Develop branch for V1 (historical)
# - main: Main branch for V2
# - develop: Develop branch for V2
#
# Package Naming:
# - from develop: 2.0.0-develop.1 (patch version increments)
# - from main (pre-release): 2.0.0-prealpha.1 or 2.0.0-beta.1
# - from main (release): 2.0.0 (patch version increments)
#
mode: ContinuousDelivery # GitVersion 6.x is configured here to use ContinuousDelivery mode for this GitFlow-style setup
# We prefix our tags with 'v' or 'V' (e.g., v1.0.0)
tag-prefix: '[vV]'
branches:
# V2 Release Branch
main:
# Matches the main branch
regex: ^main$
# Uses 'alpha' as pre-release label before `beta`
label: rc
# Increments patch version (x.y.z+1) on commits
increment: Patch
# Specifies develop as the source branch
source-branches: ['develop']
# V2 Development Branch
develop:
# Matches the develop branch
regex: develop
# Adds 'develop' as pre-release label (e.g., 2.1.0-develop.1)
label: develop
# Increments patch version (x.y.z+1) on commits
increment: Patch
# No source branches specified as this is the root of development
source-branches: []
# Indicates this branch feeds into release branches
tracks-release-branches: true
# # V1 Branches - Included for historical reference
# v1_develop:
# regex: v1_develop
# label: v1_develop
# increment: Minor
# source-branches: ['v1_release']
# # Lower weight keeps V1 pre-releases sorted below V2
# pre-release-weight: 100
# v1_release:
# regex: v1_release
# # Empty label for stable releases
# label: ''
# increment: Patch
# source-branches: ['v1_develop']
# Pull Request Branches
# Configures versioning for PRs (e.g., 2.0.0-PullRequest5009.1)
pull-request:
regex: "^(pull|pull\\-requests|pr)[\\/-](?<Number>\\d+)"
label: "PullRequest{Number}"
increment: Inherit
source-branches:
- develop
- main
- feature
pre-release-weight: 30000
# Feature / Fix / Topic Branches
# Matches branches like feature/*, fix/*, issue/*, etc.
# Inherits version from develop and uses the branch name as pre-release label.
# e.g., if develop is at 2.2.0, fix/foobar produces 2.2.0-fix-foobar.1
feature:
regex: "^(feature|fix|issue|dependabot|copilot)[\\/-](?<BranchName>.+)"
label: "{BranchName}"
increment: Inherit
source-branches:
- develop
# Ignore specific commits if needed (currently empty)
ignore:
sha: []