-
Notifications
You must be signed in to change notification settings - Fork 61
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
docs: add automated changelog generation #103
Conversation
Looks good from first glance. Just fyi there is also the |
Nice, thanks! I think I'd even prefer that. The library I use for the changelog wants to bump the version by itself but I'd much rather stay as close to native npm tooling as possible. I'll check if I can integrate |
Updated it to I'd still opt for automating as much as possible. But it's probably better to have individual building blocks that we can then automate vs. doing it all in one go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 💪
Only nit: package-lock.json
has been checked in with v0.0.3 - causing untracked git changes on npm install
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Looks good to me ✅
I tested it by bumping the version to 0.0.3, everything worked as expected. I'd say let's merge this and update the changelog in one go for all past versions once we do the release tag?
One more thing that just came to mind: any thoughts on rc
tags for release candidates? Not that it's required now, just wondering if some of you have any strong opinions or insights in that regard.
Fixed! That was from testing and I probably forgot to revert it. |
No strong opinions. We could also think about adding a |
We'll need to do that manually since we didn't use conventional commits back then—so not much will show up in the autogenerated changelog. I can take care of that in a separate PR though. As for the general release process, since master is a protected branch, we won't be able to bump and tag in one go (assuming we want the release tag on master which probably makes sense I would say). We'd have to do somethign like this:
Thoughts? If ok with everyone I can add npm scripts for that to make the process easier and documented in a way. |
Moving this discussion to an issue. ☝️ #105 Would love to hear everyone's thoughts! |
🚨 I don't have much experience releasing JavaScript/npm stuff so I might be missing some best practices here.
Adds npm scripts to generate a changelog template after bumping the version:
npm run changelog
This does:
package.json
).We can then manually edit the changelog, commit and PR it.
We then still need to manually tag the release on master after merging the "prepare" PR. Depending on how our release process evolves we can of course also automate these steps in the future even more. For example it would be nice to automatically tag a release and create a GitHub release (based on the changelog) using GitHub actions.
Changelog
We already started using conventional commits for our commit messages when we squash a PR. That make sit easy to prefill the changelog with these messages to get something that's already human readable and adheres to the keep-a-changelog format.
I've set it up so that all commits of types
feat
,update
,remove
,fix
,security
get included in the changelog by default. This is just what came to my mind based on keep-a-changelog. Let me know if we should include/remove things.I left the changelog uncommited on purpose so that we can manually go over it and adapt it as needed (remove/add things, reformulate, etc.)
Example
The following is how the automatically generated changelog for v0.0.3 would look like. Not perfect but with a few manual edits and deletions I think it'll be quite nice—and thanks to the auto-generation much much less work than collecting and linking all that info manually.
0.0.3 (2022-02-16)
Added
Fixed