Question
I really like the tool but I struggle to make it work for my case.
I have a Gitlab flow setup with main, staging and production branches.
From time-to-time main is merged into staging and staging is merged to production.
I run semantic-release on all three branches
My flow is:
- I create a couple of "feat: ..." commits in
main. They are correctly tagged as 1.0.0-dev.1 and 1.0.0-dev.2
- I then merge
main to staging. The merge commit is correctly tagged as 1.0.0-rc.1
- I merge
staging to production. The merge commit in production is correctly tagged as 1.0.0
- I create a new "feat: ..." commit in
main. It receives a 1.0.0-dev.3 tag instead of 1.1.0-dev.1 tag
Am I doing something wrong or this case is not supported and there is nothing I can do to make it work correctly?
Would appreciate any insights. Thanks!
Configuration
Semantic Release Configuration
[semantic_release.branches.main]
match = "main"
prerelease_token = "dev"
prerelease = true
[semantic_release.branches.staging]
match = "staging"
prerelease_token = "rc"
prerelease = true
[semantic_release.branches.production]
match = "production"
prerelease = false
Additional context
I run semantic-release -c releaserc.toml -vv version --no-commit --no-changelog --no-vcs-release on main
I run semantic-release -c releaserc.toml -vv version --no-commit --no-changelog on staging and production
I do merges with --no-ff
git log --oneline --decorate --graph --all -n 50
* b04fbea (tag: v1.0.0-dev.3, origin/main, origin/HEAD, main) feat: feature 3
| * d155f0f (HEAD -> production, tag: v1.0.0, origin/production) Merge branch 'staging' into production
| |\
| | * 4ecd51f (tag: v1.0.0-rc.1, origin/staging, staging) Merge branch 'main' into staging
| | |\
| |_|/
|/| |
* | | 19ab5f9 (tag: v1.0.0-dev.2) feat: add feature 2
* | | e3e60be (tag: v1.0.0-dev.1) feat: feature 1
Question
I really like the tool but I struggle to make it work for my case.
I have a Gitlab flow setup with
main,stagingandproductionbranches.From time-to-time
mainis merged intostagingandstagingis merged toproduction.I run semantic-release on all three branches
My flow is:
main. They are correctly tagged as1.0.0-dev.1and1.0.0-dev.2maintostaging. The merge commit is correctly tagged as1.0.0-rc.1stagingtoproduction. The merge commit in production is correctly tagged as1.0.0main. It receives a1.0.0-dev.3tag instead of1.1.0-dev.1 tagAm I doing something wrong or this case is not supported and there is nothing I can do to make it work correctly?
Would appreciate any insights. Thanks!
Configuration
Semantic Release Configuration
Additional context
I run
semantic-release -c releaserc.toml -vv version --no-commit --no-changelog --no-vcs-releaseonmainI run
semantic-release -c releaserc.toml -vv version --no-commit --no-changelogonstagingandproductionI do merges with
--no-ffgit log --oneline --decorate --graph --all -n 50