frinyvonnick / gitmoji-changelog

A changelog generator for gitmoji 😜
https://www.npmjs.com/package/gitmoji-changelog
MIT License
390 stars 49 forks source link

Connect it with lerna publish #38

Closed fabienjuif closed 4 years ago

fabienjuif commented 6 years ago

It would be great if gitmoji-changelog can be interfaced with lerna publish.

One idea could be to use the last pushed lerna tag

Maybe this workflow?

  1. publish with lerna
  2. run gitmoji-changelog
  3. commit --amend
  4. retag
FBerthelot commented 5 years ago

@bpetetot @frinyvonnick

You are using lerna and gitmoji-changelog on this project. What is your workflow ?

I make it work like this:

### Workflow with mono-repo(lerna)

lerna work with conventional-changelog, so you need to update the `lerna.json` file to make it compliant with gitmoji-changelog. Add this 

</code>
{
  "//": "...other custom lerna configuration",
  "command": {
    "version": {
      "message": "chore(release): publish %s"
    }
  }
}
</code>

1. Make changes and commit: `git commit -m ":sparkles: my awesome feature"`
2. Run `gitmoji-changelog`, then the file `CHANGELOG.md` is created or updated with all changes
3. You can freely edit the new release in the changelog file, it will not be overwrite with the next generation
4. Commit `CHANGELOG.md` file
5. Bump version with learna (ex: `1.0.0`) using this command: `learn version`

Everything is pushed on git repository. Learna can also generate the github release 

Moreover, lerna can now generate github release, so I see two options here:

FBerthelot commented 5 years ago

I've forgot, to link this to #45 because lerna handle github and gitlab release.

And I think we should add documentation of workflow with lerna

frinyvonnick commented 4 years ago

Closed in favor of #86