Open michalvadak opened 1 year ago
Same happens to me in Azure DevOps. What i noticed is that pipelines (at least in Azure DevOps) by default checkout to detached HEAD and seems to haves no knowledge of other branches. What I did is that I added git fetch && git checkout to main branch before I run version command. I don't know if this is the best solution, but it's an easy one. In another project I am using semantic-release tool which had no problems with pushing changes back to designated branch. Hope this helps :)
Yeah, the semantic-release
is actually using the git push origin HEAD:main
Thanks @michalvadak for raising the issue. We'll have to dive into this.
Meanwhile, could you confirm that using baseBranch: 'HEAD:main'
works for you?
Thank you 🙏
baseBranch: 'HEAD:main'
works fine
When you push in Gitlab CI like
git push origin main
you will get this errorProposed solution Push like this
git push origin HEAD:main
then it worksMore info here