Skip to content
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

Automatically maintain release notes using GitHub Actions #472

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

mattbrictson
Copy link
Member

@mattbrictson mattbrictson commented Aug 20, 2019

This commit sets up a GitHub Actions workflow that uses Release Drafter to automatically maintain release notes on every push.

In practice this means that contributors no longer have to manually update the CHANGELOG, which is something that is easy to forget and often introduces tedious merge conflicts.

Instead, Release Drafter automatically adds the title of the PR to the GitHub release notes in a draft release, crediting the author of the PR, and linking to the PR number. Release Drafter furthermore organizes the release notes into sections according to the labels assigned to the PRs:

  • Breaking
  • Bug Fix
  • Docs
  • Feature
  • Housekeeping

This also simplifies the release process for maintainers: instead of manually updating the CHANGELOG, all you have to do is press "publish" on the release draft on GitHub.

Here is an example from another project:

https://github.com/mattbrictson/airbrussh/releases/tag/v1.3.3

This commit sets up a GitHub Actions workflow that uses Release Drafter
to automatically maintain release notes on every push.

In practice this means that contributors no longer have to manually
update the CHANGELOG, which is something that is easy to forget and
often introduces tedious merge conflicts.

Instead, Release Drafter automatically adds the title of the PR to the
GitHub release notes to a draft release, crediting the author of the PR,
and linking to the PR number. Release Drafter furthermore organizes the
release notes into sections according to the labels assigned to the PRs:

- ⚠️ Breaking
- 🐛 Bug Fix
- 📚 Docs
- ✨ Feature
- 🏠 Housekeeping

This also simplifies the release process for maintainers: instead of
manually updating the CHANGELOG, all you have to do is press "publish"
on the release draft on GitHub.

Here is an example from another project:

https://github.com/mattbrictson/airbrussh/releases/tag/v1.3.3
@mattbrictson mattbrictson added the 🏠 Housekeeping Non-user facing cleanup and maintenance label Aug 20, 2019
@leehambley
Copy link
Member

I'm not thrilled about all the other emojis in the changelog, I think this is a bit unnecessary and kitschy but the rest of it looks great.

Let's give it a try?

We also need a corresponding PR in the capistrano/danger repo to stop the danger automates code review complaining, right?

@mattbrictson
Copy link
Member Author

I'm not thrilled about all the other emojis in the changelog

No problem, I've updated the Release Drafter config to remove the emoji.

Note that maintainers will have to remember to add the appropriate label to a PR before merging it, if they want it to be automatically categorized in the release notes. I've named all the labels starting with a PR: prefix:

  • PR: Breaking
  • PR: Feature
  • PR: Bug Fix
  • PR: Docs
  • PR: Housekeeping

(However if you don't use one of these labels, the PR will still automatically be added to the release notes, just in a catch-all section. So it's not a big deal if you forget.)

Should this be documented somewhere for current and future maintainers? E.g. MAINTENANCE.md or CONTRIBUTING.md (I'm not sure if there is a convention)?

We also need a corresponding PR in the capistrano/danger repo to stop the danger automates code review complaining, right?

I created a branch for now. I didn't want to merge it into capistrano/danger master yet because that is being used by other capistrano projects that still have CHANGELOGs.

@leehambley
Copy link
Member

Good point, this all looks good to me, and honestly the emojis in the change-log for airbrussh look nice. I had assumed it would be one emoji per line and not one for each heading, with them being grouped.

Nice stuff mate, LGTM.

@mattbrictson mattbrictson force-pushed the chores/use-github-actions-for-releases branch from 7eb4255 to b245b18 Compare August 23, 2019 01:57
@mattbrictson
Copy link
Member Author

Thanks! I'll add the emoji back in and get this merged. 👍

@mattbrictson mattbrictson merged commit 986331e into master Aug 23, 2019
@mattbrictson mattbrictson deleted the chores/use-github-actions-for-releases branch August 23, 2019 02:02
@leehambley
Copy link
Member

Thank you for for your patience dude 🙏

@mattbrictson
Copy link
Member Author

It's working 🙂

Screen Shot 2019-08-26 at 8 46 13 PM

@leehambley
Copy link
Member

so pretty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏠 Housekeeping Non-user facing cleanup and maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants