-
Notifications
You must be signed in to change notification settings - Fork 10
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
WB-586: Add changesets to automate the release process #1221
Conversation
Summary: - Introduces `changesets` to the repository. - Adds a new workflow to handle releases. This will be triggered after the "release coordinator" (one of WB's admins) has approved the release (by hitting the `Merge` button). - Creates a new `release` script to handle releases using `changesets` instead of `lerna`. (keeping `lerna/publish` for backwards compatibility). More info about the new release process here: https://www.figma.com/file/xaYyzIuKLxqXAJVAl3y1S4/Wonder-Blocks-Web-Eng-process?node-id=50%3A400 NOTE: To include a regular PR in the release PR, the PR's author will need to run `yarn changesets` to include the changes for each package they have changed. More info about using it on this part of the process here: https://www.figma.com/file/xaYyzIuKLxqXAJVAl3y1S4/Wonder-Blocks-Web-Eng-process?node-id=81%3A549 Issue: https://khanacademy.atlassian.net/browse/WB-586 Test plan: Merge this PR and verify that the "Release PR" gets created after a contributor lands a PR (merges it into `master`).
|
✔️ Deploy Preview for wonder-blocks ready! 🔨 Explore the source changes: edf3d58 🔍 Inspect the deploy log: https://app.netlify.com/sites/wonder-blocks/deploys/61943476ccce220007346f21 😎 Browse the preview: https://deploy-preview-1221--wonder-blocks.netlify.app/ |
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
✔️ Deploy Preview for wonder-blocks ready! 🔨 Explore the source changes: 0445964 🔍 Inspect the deploy log: https://app.netlify.com/sites/wonder-blocks/deploys/619434fb3dcb2400083e856b 😎 Browse the preview: https://deploy-preview-1221--wonder-blocks.netlify.app |
Size Change: 0 B Total Size: 96 kB ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## master #1221 +/- ##
=======================================
Coverage 96.33% 96.33%
=======================================
Files 147 147
Lines 3577 3577
Branches 1025 1025
=======================================
Hits 3446 3446
Misses 131 131 Continue to review full report at Codecov.
|
✔️ Deploy Preview for wonder-blocks ready! 🔨 Explore the source changes: 06d364e 🔍 Inspect the deploy log: https://app.netlify.com/sites/wonder-blocks/deploys/61ae7f31cbca4c0007d99d13 😎 Browse the preview: https://deploy-preview-1221--wonder-blocks.netlify.app |
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.
I think it would be good to have an ADR to support this change. changesets
looks like a great tool, but we should have documentation in confluence explaining why we picked this tool over other tools.
branches: | ||
- master |
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.
Does this mean if a person wants to batch work together from multiple PRs before release, they'll need to land those PRs on to a non-master branch? If so, what impact does this have on our required checks?
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.
hmm good question, for more clarification... do you mean about required checks at PR level? or when pushing to master
?
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.
I originally thought the release process was automatically like it is with semantic-release, but that isn't the case with changesets because someone needs to create a release PR.. It looks like this workflow runs whenever anything is pushed to master
. Is that right?
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.
I chatted with Juan in Slack and learned that the action runs once to generate the PR if there's any changeset markdown files. This PR converts those markdown files to changelogs. Once the PR lands then the action runs a second time and will do the publish since there are no pending changeset markdown files.
"linked": [], | ||
"access": "public", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", |
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.
Does this take into account whether that internal dep was bump by a patch, minor, or major version number?
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.
It's when we bump by patch.
@@ -0,0 +1,10 @@ | |||
{ | |||
"$schema": "https://unpkg.com/@changesets/config@1.6.2/schema.json", | |||
"changelog": "@changesets/cli/changelog", |
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.
Are there different tools that can be used to generate a change log file?
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.
It's customizable, even you can pass a function where you can modify that format: https://github.com/changesets/changesets/blob/main/docs/modifying-changelog-format.md
Config info: https://github.com/changesets/changesets/blob/main/docs/config-file-options.md#changelog-false-or-a-path
SLACK_USERNAME: GithubGoose | ||
SLACK_ICON_EMOJI: ":goose:" |
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.
lol
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.
LGTM. Thanks for taking the time to walk me through the process. I think I have a better understanding of it now.
Summary:
changesets
to the repository.the "release coordinator" (one of WB's admins) has approved the
release (by hitting the
Merge
button).release
script to handle releases usingchangesets
instead of
lerna
. (keepinglerna/publish
for backwards compatibility).More info about the new release process here:
https://www.figma.com/file/xaYyzIuKLxqXAJVAl3y1S4/Wonder-Blocks-Web-Eng-process?node-id=50%3A400
NOTE: To include a regular PR in the release PR, the PR's author will
need to run
yarn changesets
to include the changes for each packagethey have changed.
More info about using it on this part of the process here: https://www.figma.com/file/xaYyzIuKLxqXAJVAl3y1S4/Wonder-Blocks-Web-Eng-process?node-id=81%3A549
Issue: WB-586
Test plan:
Merge this PR and verify that the "Release PR" gets created after a
contributor lands a PR (merges it into
master
).Here's an example of how the
Release PR
will look: emotion-js/emotion#2394