github-actions-maven-release icon indicating copy to clipboard operation
github-actions-maven-release copied to clipboard

Add command to update CHANGELOG.md

Open ycharaf-adeo opened this issue 3 years ago • 5 comments

We should update changelog.md while updating the pom.xml in the release process

ycharaf-adeo avatar Mar 08 '21 10:03 ycharaf-adeo

For example: npx standard-version --release-as $RELEASE_VERSION --skip.commit=true --skip.tag=true

ycharaf-adeo avatar Mar 09 '21 13:03 ycharaf-adeo

I think this is a good idea @ycharaf-adeo , I would definitively would like that in my repositories. Lets see how we can do that, here is my current state of mind:

I use maven release for this github actions, which means we need to look for a solution around maven, and in particular how to run a custom execution during the maven release.

For example, in this sample repo, I do the jib build and push as part of the maven package: https://github.com/qcastel/github-actions-maven-release-sample/blob/master/pom.xml#L55

Browsing on the internet, I found: https://github.com/tomasbjerre/git-changelog-maven-plugin I haven't really fully understood how this plugin ^ works. It seems to generate some .md. Not sure how we can bind that nicely into the jar, if that's what you were thinking of.

We should update changelog.md while updating the pom.xml in the release process

I don't think I can really do that, unless you got an idea of how to achieve this with maven release?

Another option for you is to have a CI that is listening to tags, and this way, you can do some specific actions on tags and publish it somewhere. Perhaps using something like https://github.com/elgohr/Github-Release-Action ?

For example: npx standard-version --release-as $RELEASE_VERSION --skip.commit=true --skip.tag=true

If you want to run a specific command like that, you can probably achieve this by doing a dedicated github action trigger on tags.

What do you think?

qcastel avatar Mar 09 '21 14:03 qcastel

Hi, I am also working on CHANGELOG problem.

Inspired by: https://about.gitlab.com/blog/2018/07/03/solving-gitlabs-changelog-conflict-crisis/ I have started to create a plugin, which will be generating CHANGELOG.md from YAML files during release and also will be able to change release name, taking it form pom.xml

https://github.com/marwin1991/keep-changelog-maven-plugin

Currently it is a PoC :)

marwin1991 avatar Mar 18 '21 07:03 marwin1991

Sounds awesome, will be interested to see it into action!

What do you think if we add it to the sample repository? That will be a nice way to show an end to end Java release with release notes improvement. The repo is here btw: https://github.com/qcastel/github-actions-maven-release-sample

You could fork it, test a bit and then do a PR back to the repository? I can then help you with the final details.

At the end, I can imagine something where I would point to your github actions in a section of the readme for the people interested in automatising the change log

qcastel avatar Mar 20 '21 09:03 qcastel

@ycharaf-adeo or @qcastel f you are interested in changing current appearance of generating CHANGELOG.md file feel free to open issue and propose changes.

Sample CHANGELOG.md file can be found here: https://github.com/marwin1991/keep-changelog-maven-plugin/blob/main/CHANGELOG.md

marwin1991 avatar Mar 21 '21 12:03 marwin1991