readme: update docs around doing releases#1985
Conversation
|
Codecov Report
@@ Coverage Diff @@
## develop #1985 +/- ##
========================================
Coverage 74.42% 74.42%
========================================
Files 79 79
Lines 2545 2545
Branches 397 397
========================================
Hits 1894 1894
Misses 651 651
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
| ### Release new versions | ||
|
|
||
| Developers can release new versions of the software by adding changesets to their pull requests using `yarn changeset`. Changesets will persist over time on the `develop` branch without triggering new version bumps to be proposed by the Changesets bot. Once changesets are merged into `master`, the bot will create a new pull request called "Version Packages" which bumps the versions of packages. The correct flow for triggering releases is to re-base these pull requests onto `develop` and merge them, and then create a new pull request to merge `develop` onto `master`. Then, the `release` workflow will trigger the actual publishing to `npm` and Docker hub. | ||
| Developers can release new versions of the software by adding changesets to their pull requests using `yarn changeset`. Changesets will persist over time on the `develop` branch without triggering new version bumps to be proposed by the Changesets bot. Once changesets are merged into `master`, the bot will create a new pull request called "Version Packages" which bumps the versions of packages. The correct flow for triggering releases is to update the base branch of these pull requests onto `develop` and merge them, and then create a new pull request to merge `develop` into `master`. Then, the `release` workflow will trigger the actual publishing to `npm` and Docker hub. |
There was a problem hiding this comment.
What happens if "Version Packages" PR gets merged to master? Won't that trigger the release properly as well? Don't quite get why merge to develop them master again
There was a problem hiding this comment.
Then master and develop would diverge.
Practically, the packages would be build from master fine (I tihnk), but the changeset files would not be removed from develop and the next dev -> master will try and add then again.
There was a problem hiding this comment.
But we can merge the same branch to master and also to develop and we'll have the same "Version Packages" commit in both, why all the complexities with PRs? Can't we just do
$ git checkout master
$ git merge --no-ff version-packages-branch
$ git checkout develop
$ git merge --no-ff version-packages-branch
There was a problem hiding this comment.
I don't have strong opinion on how the task is accomplished, only that the functionality and necessary steps are documented 😄
There was a problem hiding this comment.
I'm not super opinionated on how its done either as long as it works. The existing workflow is done via the github ui which is why it works the way it does. Doing it via git would mean that pushing to master is enabled and that the changesets workflow is setup to work on pushes and then we'd have to close the PR on github (unless its smart enough to auto detect merge on push)
There was a problem hiding this comment.
I suggest we reword this section
The correct flow for triggering releases is to update the base branch of these pull requests onto
developand merge them, and then create a new pull request to mergedevelopintomaster. Then, thereleaseworkflow will trigger the actual publishing tonpmand Docker hub.
to
"The correct flow for triggering releases is to first merge the branch of these pull requests into develop via
$ git checkout develop
$ git merge --no-ff changeset-release/master
and then merge the PR to maser. Then, the release workflow will trigger the actual publishing to npm and Docker hub."
We don;t need to push to master this way but we can still avoid the convoluted PR mechanism cc @tynes
|
We generally need to rethink the changesets process. Until then, I'm approving this since it's better to at least have the bad process documented. |
Description
Update the docs in the
READMEfor how to do releases. This information was already documented, just adding a bit more to prevent future problems.