Option to add and push git tags from the publish command
See original GitHub issueI’d like an option to have lerna publish from-package
to do the same git tagging as lerna version
.
This may be related to #1951 .
Expected Behavior
- Add an option to the publish command to push tags, or
- Add options to the version command to identify which packages will be published, but not bump the version
Current Behavior
lerna version
always changes the version unless you run in interactive mode and reset it to the same version. It tags the commit with the versions published at that commit. lerna publish from-package
publishes but does not tag the commit.
Possible Solution
Add a --git-tag-version
option to the publish from-package
command, which tag the commit. I may be able to submit a PR with this after next week.
Another option would be to have the publish
command optionally write the published packages to a structured file (json). Then we could just run the version command with the same version to utilize the other commands, such as GitHub releases and tagging.
Context
I’m trying to setup my project such that it publishes unpublished packages from CI on each commit to master. lerna publish from-package
does everything I want except the tagging. Next, I’m hoping to push release notes to GitHub which the version
command does.
Executable | Version |
---|---|
lerna --version |
3.13.1 |
npm --version |
6.9.0 |
yarn --version |
1.13.0 |
node --version |
v8.15.0 |
OS | Version |
---|---|
macOS Mojave | 10.14.4 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:14 (2 by maintainers)
Top GitHub Comments
I don’t know what @goodmorninggoaway wants to do, but I want the same feature, so that I can have a Jenkins pipeline that does everything up to and including
lerna version
automatically (conventional commits, so no human input needed to figure out the version number), then waits for a human to approve. After approval it should create/push the tag and publish to npm. No more, no less. And before you suggest it, no, I do not want to runversion
after the human approval because part of the approval process includes reviewing documentation that is generated duringversion
andpostversion
hooks.@bigwoof91 I ended up moving to a different project, so I’m not using let a anymore, but that seems promising if I ever get back to a lerna monorepo