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

Auto-bump version number in generated release notes #2140

Merged
merged 1 commit into from Sep 26, 2023

Conversation

mattbrictson
Copy link
Member

We are using Release Drafter1 to automatically write our release notes.

Before, Release Drafter was configured to increment the version number at the patch level, regardless of what was included in the release notes. For example, if the current version is 3.17.3, the draft of the next release would assume a version number of 3.17.4.

With this commit, Release Drafter will now bump the version number based on the concents of the release. A patch bump is the default, but if there is a new feature or breaking change in the release, it will now recommend a minor bump.

This commit also modifies the release notes template to add a link to the full diff of the release on GitHub.

Footnotes

  1. https://github.com/release-drafter/release-drafter

We are using Release Drafter[^1] to automatically write our release
notes.

Before, Release Drafter was configured to increment the version number
at the patch level, regardless of what was included in the release
notes. For example, if the current version is 3.17.3, the draft of the
next release would assume a version number of 3.17.4.

With this commit, Release Drafter will now bump the version number based
on the concents of the release. A patch bump is the default, but if
there is a new feature or breaking change in the release, it will now
recommend a minor bump.

This commit also modifies the release notes template to add a link to
the full diff of the release on GitHub.

[^1]: https://github.com/release-drafter/release-drafter
@mattbrictson mattbrictson added the 🏠 Housekeeping Non-user facing cleanup and maintenance label Sep 22, 2023
name-template: "$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"
name-template: "$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗒️ This tells Release Drafter to intelligently pick the next version number, rather than always doing a patch bump.

Comment on lines +14 to +19
version-resolver:
minor:
labels:
- "⚠️ Breaking"
- "✨ Feature"
default: patch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗒️ Simple logic for determining $RESOLVED_VERSION

@mattbrictson mattbrictson merged commit c60cae8 into master Sep 26, 2023
10 of 18 checks passed
@mattbrictson mattbrictson deleted the chores/auto-inc-release-ver branch September 26, 2023 01:04
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.

None yet

1 participant