-
-
Notifications
You must be signed in to change notification settings - Fork 277
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 create release notes #1859
Conversation
Adds a new rake task, `rake create_release_notes` which generates a relnotes.md file. When CI creates and publishes a new gem version, it will now also create a release on GitHub, with the content of relnotes.md being used as release notes.
b53f4fb
to
30504e0
Compare
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
bundle exec rake create_release_notes | ||
gh release create $(git tag --points-at @) --notes-file relnotes.md |
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.
ask) Should we need to create a release version tag before this?
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.
Yes. It’s created and pushed by line 20. And also, it should run before the git push
below which would cause git tag --points-at @
to no longer return the current tag 😅
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.
You can see a successful run in https://github.com/bquorning/bquorning-test-gem/actions/runs/8529988960/job/23366914966 which created:
- gem: https://rubygems.org/gems/bquorning-test-gem/versions/0.7.2
- git tag: https://github.com/bquorning/bquorning-test-gem/tree/v0.7.2
- github release: https://github.com/bquorning/bquorning-test-gem/releases/tag/v0.7.2
- pushed a separate commit to main: bquorning/bquorning-test-gem@97240ff
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.
Thank ypu for the explanation! I understand😀
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.
Looks good!
Adds a new rake task,
rake create_release_notes
which generates a relnotes.md file.When CI creates and publishes a new gem version, it will now also create a release on GitHub, with the content of relnotes.md being used as release notes.
Before submitting the PR make sure the following are checked:
master
(if not - rebase it).CHANGELOG.md
if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).