-
I am trying to build a commit that has tag This is the error in the github action
This is my config, which use # next-version: "1.0.0" #enable only when you want to increment from 0.x.x to 1.0.0
assembly-versioning-format: "{MajorMinorPatch}.{CommitsSinceVersionSource}"
assembly-file-versioning-format: "{MajorMinorPatch}.{CommitsSinceVersionSource}"
assembly-informational-format: "{InformationalVersion}"
major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
mode: ContinuousDelivery
commit-message-incrementing: Enabled
label: ci
update-build-number: true
strategies:
- ConfiguredNextVersion
- Mainline
branches:
main:
regex: ^main$
mode: ContinuousDelivery
label: ""
increment: Patch
prevent-increment:
of-merged-branch: true
track-merge-target: false
source-branches: []
tracks-release-branches: false
is-release-branch: false
is-main-branch: true
track-merge-message: false
pre-release-weight: 55000
release:
regex: ^release[/-]
mode: ContinuousDelivery
label: ""
increment: Patch
prevent-increment:
when-current-commit-tagged: true
track-merge-target: false
source-branches: ["main"]
tracks-release-branches: false
is-release-branch: true
is-main-branch: false
pre-release-weight: 55000
feature:
regex: ^feat(ures?)?[/-](?<BranchName>.+)
mode: ContinuousDelivery
label: "{BranchName}"
increment: Patch
prevent-increment:
of-merged-branch: false
track-merge-target: false
source-branches: ["main", "feature", "fix"]
tracks-release-branches: false
is-release-branch: false
is-main-branch: false
pre-release-weight: 30000
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDelivery
label: PullRequest
increment: Patch
prevent-increment:
of-merged-branch: false
label-number-pattern: '[/-](?<number>\d+)[-/]'
track-merge-target: false
source-branches: ["main", "feature", "fix"]
tracks-release-branches: false
is-release-branch: false
is-main-branch: false
pre-release-weight: 30000
fix:
regex: ^(hot)?fix(es)?[/-](?<BranchName>.+)
mode: ContinuousDelivery
label: beta
increment: Patch
prevent-increment:
of-merged-branch: false
track-merge-target: false
source-branches: ["main"]
tracks-release-branches: false
is-release-branch: false
is-main-branch: false
pre-release-weight: 30000 This only occurs on the ci build, no problem locally |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Would be good to have it reproducable. |
Beta Was this translation helpful? Give feedback.
-
no need, the problem that causes this is a detached HEAD. https://github.com/actions/checkout?tab=readme-ov-file It can be reproduced locally by running > git tag 0.0.1
> git checkout 0.0.1
> gitversion |
Beta Was this translation helpful? Give feedback.
no need, the problem that causes this is a detached HEAD.
Github actions checks the code out at the tag without creating a branch.
https://github.com/actions/checkout?tab=readme-ov-file
It can be reproduced locally by running