Skip to content

docs: Release Guidelines #306

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

Merged
merged 2 commits into from
Aug 11, 2020

Conversation

lholmquist
Copy link
Contributor

@lholmquist lholmquist commented Aug 7, 2020

This is the start of a release guidelines for maintainers.

I think i have everything here. There is one TODO, asking if we should have a specified time after the last "+1" from other maintainers.

Outstanding questions:

  • does the current release script also sign and adds the "signed-off by" thing
  • Should we mention something on publishing docs here
  • Should we add that we should create a "release" on github

Description

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
@lholmquist lholmquist requested review from lance and grant August 7, 2020 18:38
@lholmquist lholmquist linked an issue Aug 7, 2020 that may be closed by this pull request
Copy link
Member

@grant grant left a comment

Choose a reason for hiding this comment

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

Can we use a GitHub action for automatic releases on push to master?

@lance
Copy link
Member

lance commented Aug 7, 2020

@lholmquist

does the current release script also sign and adds the "signed-off by" thing

No it doesn't. Good catch - I guess a step in the process should be to amend that commit

Should we mention something on publishing docs here

The docs are automatically published on release using a github workflow

Should we add that we should create a "release" on github

Yes, probably so. GitHub considers a new tag a release, for the purposes of workflows, but I try to copy the generated section of CHANGELOG.md and paste it into the release markdown here
image

We may also want to add a step to the release process to actually create a branch for the release version, in addition to a tag. This has been discussed before and rejected, but it would make possible @grant's suggestion below.

@grant

Can we use a GitHub action for automatic releases on push to master?

That's a decent suggestion, but I don't think we should do that for every push to master since that would mean a release for every PR that lands. If we create a branch for each release, then we could have a workflow handle the actual releases, and our release process would be simply pushing the new branch. The workflow would detect the branch and then do the steps that are outlined above. But I'm not sure I love this idea.

Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

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

LGTM other than the signoff issue, and copying the CHANGELOG updates to the release body in GitHub

@grant
Copy link
Member

grant commented Aug 7, 2020

Yup, not sure exactly how the bot would work with the branching, but I definitely recommend setting up GitHub actions for automatic release PR creation and automatic publishing when the PR is merged by a human.


Before a release can be finalized, other maintainers should give a +1 or a thumbs up or some other identifying mark that they are good with the changes.

// TODO: should we wait a specified time after the +1's before we create
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary. All PRs should only land if a maintainer approved it.


### Get Consensus

Before a release can be finalized, other maintainers should give a +1 or a thumbs up or some other identifying mark that they are good with the changes.
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine not having this step so long as all commits are approved.


Once consensus has been reached on the proposal it is time to create the release and publish it to npm.

### Create the Release
Copy link
Member

Choose a reason for hiding this comment

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

If we can use a release bot instead of scripts, that may make the process easier and less error prone.

git push upstream master --follow-tags
```

### Publish to npm
Copy link
Member

Choose a reason for hiding this comment

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

A release bot would sent a PR that would automatically publish when the PR is merged by a human.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what about 2FA on npm, Not sure i really want to store a token anywhere

Copy link
Member

Choose a reason for hiding this comment

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

For publishing with bots, I don't believe many packages enable 2FA for publishing (different than login). I think there are blogposts about this.

@lholmquist
Copy link
Contributor Author

Can we use a GitHub action for automatic releases on push to master?

Similar to @lance 's thought, i'm not a big fan of having a release on every single push to master. We don't really need a new release everytime a new snyk PR is merged or a typo on a Readme.

I think we should revisit the "create a new branch for a release" workflow and see how github actions fits into that. I'm also reminded of this tweet i saw the other day:

"Never spend 6 minutes doing something by hand when you can spend 6 hours failing to automate it" :)

The main reason for the document, is that we have a pending release, #300 , that we should probably get out this week, and we didn't have any document about the process. So if this works for our current process, then we can iterate on it later

@lance
Copy link
Member

lance commented Aug 10, 2020

The main reason for the document, is that we have a pending release, #300 , that we should probably get out this week, and we didn't have any document about the process. So if this works for our current process, then we can iterate on it later

Definitely agree with this. Let's get through this doc using the existing processes and open an issue around release automation.

@lholmquist
Copy link
Contributor Author

addressing the signoff of the release commit in this PR #307

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
@lholmquist lholmquist requested a review from lance August 10, 2020 18:03
@lholmquist lholmquist merged commit 08bf15d into cloudevents:master Aug 11, 2020
@lholmquist lholmquist deleted the 304-release-procedure-doc branch August 11, 2020 13:25
@lholmquist lholmquist mentioned this pull request Aug 11, 2020
@lance lance mentioned this pull request Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release Procedure Document
3 participants