-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to tag and publish an initial v1.0.0 with conventional commits? #2325
Comments
After a bit more digging and testing I've realized I can just call |
@rfgamaral - I have the same question/problem as your initial question. I have a build automating my publishing based on
Since its automated and I can't on a case by case basis run However in the lerna changelog I noticed that for version 3.22.0 and this commit/PR specifically that version 0 will be preserved on BREAKING CHANGE commits associated with it .... so how the heck do you automate releasing an initial version 1.0.0? |
The only way I can see updating now would be to manually change packages to 1.0.0-alpha.0 and then run lerna conventional graduate on that. The new system is inline with node but confusing, and to some degree a breaking change instead of a minor change. Any other solutions for moving from 0.x.x => 1 after lerna 3.22.x? @evocateur |
yeah i understand aligning the behavior with node for 0.x.x, so no arguments there - it just seems like there is no automated way to initially create a package in a monorepo and publish it as 1.0.0 using conventional-commits ... running the conventional graduate makes sense, but I'm still unclear how I would automate that since you are required to specify the specific package you want to graduate (otherwise it automatically does all of the pre-release packages in a similar fashion to force publish) ... maybe the graduation process isn't meant to be automated with conventional commits, which is disappointing because otherwise it works flawlessly |
also currently looking for a way to automate this. tools like semantic release bump properly to v1 on initial publish |
I'm having a hard time figuring out how can I tag and publish an initial v1.0.0 with conventional commits using
lerna publish
.This is my
lerna.json
:Now let's say I'm working on my first initial version and I have a single package (not relevant to have more for the purpose of this issue) which has
"version": "1.0.0"
inpackage.json
.If I make
fix: ...
commits,lerna publish
will suggest the next version to bev1.0.1
, if I makefeat: ...
commits,lerna publish
will suggest the next version to bev1.1.0
. Even if I set"version": "0.0.0"
inpackage.json
,fix: ...
will lead tov0.0.1
andfeat: ...
will lead tov0.1.0
.The only I've found to have
lerna publish
to tag and publish the first version asv1.0.0
is to have the major version inpackage.json
set to0
(minor and patch can be anything) and then make aBREAKING CHANGE
commit. That waylerna publish
will suggest the next version to bev1.0.0
.But it doesn't feel right to add
BREAKING CHANGE
to a commit just for the purpose of tagging a first release asv1.0.0
. There's not breaking change (it's the initial version after all) and that will be added toCHANGELOG.md
, which doesn't make sense.How can I tag and publish the first initial version of my package as
v1.0.0
with a single entry on myCHANGELOG.md
something likefeat: initial version
?The text was updated successfully, but these errors were encountered: