-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add an action and a GitHub workflow to get release notes via GitHub and prepare release content. #16
Conversation
TODAY=$(date '+%Y-%m-%d') | ||
NEXT_VER="${{ steps.get-notes.outputs.next-version }}" | ||
CHANGELOG="${{ steps.get-notes.outputs.release-changelog }}" | ||
CHANGELOG=$(echo "$CHANGELOG" | sed -E 's/\.? by @[^ ]+ in (https:\/\/github\.com\/.+)/. (\1)/') |
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.
🚧 If we remove the PR authors and links, I think we should also remove the
## New Contributors
section. (See https://github.com/woorelease-bugs/initial-release/releases/new?tag=1.0.1 fro an example)
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.
The outputs.release-changelog
output only contains the part of "## What's Changed" heading and its entries. So other contents won't be included. I added output logs in the get-release-notes action by dd0226a. It should be easier to know the actual values of outputs and to use them.
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.
Ah, ok, now I got it.
/## What's Changed\n([\d\D]+?)(?=\n\n)/i
catches all the things before the double line break => before
##New Constributors
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 tool, thanks!
Reviewed the code, and inspected workflow logs - LGTM.
The only comments I have are:
- 🚧 https://github.com/woocommerce/grow/pull/16/files#discussion_r902845866
- 💅 that maybe we don't need that much granularity between feature/update/enhancement and we can keep only two. But, I'm fine with all three as well to keep it consistent with bigger projects. Plus we could always change it later.
@tomalec, thanks for the review.
I adjusted the config of release notes in fc88a06. By the way, after some tests, the bot accounts like Could you help with a new round of code reviews? |
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.
LGTM :) thanks
Changes proposed in this Pull Request:
This PR implements part 1 in #15 - 📌 Prepare a release content when a specific branch is created onto the target revision.
generateReleaseNotes
method toRepoTool
class.getPackageSettings
for getting the settings of package.json.Before merge:
release/actions-demo-1
andrelease/actions-demo-2
branches.Detailed test instructions:
Check simulations on Actions
💡 Since this workflow is not easy to test, I created two simulations to demonstrate the results. And two merged PRs (#11 and #12) were attached to the
[actions] changelog: add
label for grouping the changelog to match the version level.version
value in package.json as the initial release version number.version
value in package.json, and increases the version level by matching the level keywords to the changelog content.### New Features 🎉
heading that matches the minor level. So the next version is 1.1.0.Test the release preparation by creating the release branch
release/actions
branch based on this PR. https://github.com/woocommerce/grow/tree/add/prepare-release-actionThe
release/actions-demo-1
andrelease/actions-demo-2
won't trigger the workflow. They were originally therelease/actions
branch, and I renamed them to keep the demo results.Changelog entry