Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/scripts/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@

major, minor, patch, build = map(int, m.groups())

if label == "feature":
if label == "major":
major += 1
minor = 0
patch = 0
build = 0

elif label == "feature":
minor += 1
patch = 0
build = 0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/VALIDATION.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ jobs:
const labels = pr.data.labels
.map(l => l.name)
.filter(l =>
["feature","patch","build"].includes(l)
["feature","patch","build","major"].includes(l)
);

if (labels.length === 0) {
core.setFailed(
`PR does not contain any version labels, it must contain exactly one of the following labels - feature, patch, build`
`PR does not contain any version labels, it must contain exactly one of the following labels - major, feature, patch, build`
);
} else if (labels.length > 1) {
core.setFailed(
`PR contains multiple version labels, it must contain exactly one of the following labels - feature, patch, build. Found: ${labels.join(", ")}`
`PR contains multiple version labels, it must contain exactly one of the following labels - major, feature, patch, build. Found: ${labels.join(", ")}`
);
}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/VERSION.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
id: label
run: |
echo "LABEL=${{
contains(github.event.pull_request.labels.*.name, 'major') && 'major' ||
contains(github.event.pull_request.labels.*.name, 'feature') && 'feature' ||
contains(github.event.pull_request.labels.*.name, 'patch') && 'patch' ||
'build'
Expand Down
Loading