-
Notifications
You must be signed in to change notification settings - Fork 19
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
Proposal for adding semantic-release
to Hubot 🤖
#6
Open
espy
wants to merge
3
commits into
master
Choose a base branch
from
semantic-release
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
state: In Review | ||
--- | ||
|
||
# Set up release workflow with `semantic-release` | ||
|
||
[semantic-release](https://github.com/semantic-release/semantic-release) makes releasing faster, simpler and safer. All of these are valuable if we want to increase public participation in the project and increase momentum and motivation. | ||
|
||
## Motivation | ||
|
||
Releasing a package is always a bit of a Big Thing™: decisions have to be made about versioning, an error-prone manual release process has to be performed, and somebody has to actually do the work and take the responsibility if something goes wrong. So there are a few barriers to frequent releases, and many potential sources of error. Automating this process takes away all the uncertainty and hassle out of releasing, makes our version numbers more consistent and reliable, and increases release frequency and project momentum. It also does away with the concept of intentional, manual releases: whenever something lands in master and passes all the tests, `semantic-release` will package an npm release. If we do need to keep control of release timing for marketing reasons, `semantic-release` supports that too. | ||
|
||
## Proposed solution | ||
|
||
Set up `semantic-release` on `hubotio/hubot` and let it release the npm module for us automatically and continuously. | ||
|
||
## Detailed design | ||
|
||
An admin/owner [sets up](https://github.com/semantic-release/semantic-release#setup) `semantic-release` on `hubotio/hubot` using [`semantic-release-cli setup`](https://github.com/semantic-release/cli#semantic-release-cli). Since we’ve already got tests and Travis set up, this shouldn’t require any additional steps. | ||
|
||
We should update `CONTRIBUTING.md`: | ||
- include more details about our [expected commit message format](https://github.com/semantic-release/semantic-release#default-commit-message-format), and why this is important | ||
- remove the instructions for manual releases and replace them with info about `semantic-release`, how it works and why we’re using it. | ||
|
||
Manually keeping the `CHANGELOG.md` up to date no longer necessary, since `semantic-release` automatically adds each release’s changelog to `https://github.com/hubotio/hubot/releases`. We can remove it from the repo, but in the release in which we remove it, we can add a link to the `CHANGELOG.md` in the last tag that still has it, for reference. | ||
|
||
## Backward compatibility | ||
|
||
Major version numbers will be incremented more frequently, since `semantic-release` is very strict about semantic versioning. This will lead to problems with the existing Hubot Generator script, since that has limited the version range for Hubot to `^2.x`. However, this is already being [discussed](https://github.com/hubotio/hubot/issues/1057) and worked on. | ||
|
||
## Alternatives considered | ||
|
||
There are no obvious alternatives to `semantic-release`, but we did consider adding additional tooling to improve consistency and quality of commit messages: | ||
- [commitizen](http://commitizen.github.io/cz-cli/) to help new/less experienced contributors with their commit messages | ||
- [validate-commit-msg](https://github.com/kentcdodds/validate-commit-msg) to enforce commit message formats | ||
|
||
We’ve decided against this for now to reduce complexity, but will keep an eye on commit message quality with regards to the new automated release process and revisit these options if neccessary. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Instead of manual release documentation, might be worth talking about about the idea of a release branch to merge feature branches into, and also the work a maintainer might have to do to cleanup the commits of an incoming branch.