-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Release tooling: Defer version bumping to the publish step #23393
Merged
Conversation
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
shilman
changed the title
Releaase tooling: Defer version bumping to the publish step
Release tooling: Defer version bumping to the publish step
Jul 11, 2023
shilman
approved these changes
Jul 11, 2023
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.
Great work @JReinhold 🙌 Looks great
shilman
added
the
patch:yes
Bugfix & documentation PR that need to be picked to main branch
label
Jul 11, 2023
15 tasks
JReinhold
added a commit
that referenced
this pull request
Jul 12, 2023
Release tooling: Defer version bumping to the publish step (cherry picked from commit a930066)
5 tasks
JReinhold
added a commit
that referenced
this pull request
Jul 12, 2023
…oning Release tooling: Defer version bumping to the publish step - Cherry picking #23393
storybook-bot
pushed a commit
that referenced
this pull request
Jul 12, 2023
Release tooling: Defer version bumping to the publish step (cherry picked from commit a930066)
Merged
27 tasks
storybook-bot
pushed a commit
that referenced
this pull request
Jul 12, 2023
Release tooling: Defer version bumping to the publish step (cherry picked from commit a930066)
storybook-bot
pushed a commit
that referenced
this pull request
Jul 12, 2023
Release tooling: Defer version bumping to the publish step (cherry picked from commit a930066)
github-actions
bot
added
patch:done
Patch/release PRs already cherry-picked to main/release branch
labels
Jul 12, 2023
5 tasks
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build
Internal-facing build tooling & test updates
patch:done
Patch/release PRs already cherry-picked to main/release branch
patch:yes
Bugfix & documentation PR that need to be picked to main branch
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.
I will manually cherry-pick this back to
main
in follow-up PRWhat I did
This PR changes the release flow to defer the actual version bump to the publish step instead of when preparing the release PRs. This makes it possible to run CI on the release PRs. It will still calculate the version bump up front.
The
release:version
script now take two additional flags:--deferred
: This will keep the same bumping logic, except instead of bumping the versions in all the packages it will simply set a"deferredNextVersion"
property incode/package.json
and exit.--apply
: This will apply the version set at"deferredNextVersion"
, by actually bumping all the package's versions as usual. It's invalid to use this flag with--release-type
or--pre-id
, since--apply
will not do any increment calculation.The release preparation workflows then uses
--deferred
to set the deferred version.The publish workflow will look for the
"deferredNextVersion"
and if it is set, it will runrelease:version
with--apply
and commit the changes. It will not be set in cases where patch releases don't contain any releasable changes.This deferred workflow doesn't make much sense to run locally, and it's not necessary to do so, but it can be if you want to.
How to test
cd scripts
yarn release:version --release-type preminor --pre-id test
"deferredNextVersion"
is not set incode/package.json
yarn release:version --apply
"deferredNextVersion"
is removed againChecklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]