-
Notifications
You must be signed in to change notification settings - Fork 91
ci: fix next-release #1576
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
ci: fix next-release #1576
Conversation
WalkthroughThis pull request simplifies the prerelease publishing workflow. In the CircleCI configuration, the Changes
Sequence Diagram(s)sequenceDiagram
participant CI as CircleCI
participant Yarn as Yarn Script
participant Shell as Shell Process
participant Lerna as Lerna CLI
CI->>Yarn: Run `yarn run publish-prerelease`
Yarn->>Shell: Execute publish-prerelease script
Shell->>Lerna: Run `lerna changed --json`
Lerna-->>Shell: Return list of changed packages
Shell->>Lerna: Execute `lerna publish --canary prerelease --no-git-tag-version ...`
Lerna-->>Shell: Publish prerelease packages
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
package.json (1)
29-29: Streamlined Prerelease Publish Script with Dynamic Package Selection
The"publish-prerelease"script has been updated to incorporate the--canaryand--no-git-tag-versionflags while still dynamically computing the list of packages to force publish using the output fromlerna changed --jsonandjq. This simplification should help eliminate conflicts by ensuring each prerelease version is unique.If there are any edge cases where
jqmight not behave as expected (for example, if no packages have changed), you might consider adding error handling or a fallback mechanism..circleci/config.yml (1)
300-302: Simplified CI Publish Command
The publish step in thenext-releasejob has been simplified to use the commandyarn run publish-prereleaseinstead of a more complex inline script. This change not only streamlines the CI configuration but also ensures consistency with the updated publishing scripts inpackage.json.Be sure to verify in your CI logs that this simplification does not inadvertently impact the detection of changed packages or the versioning strategy.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.circleci/config.yml(1 hunks)package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-and-test
🔇 Additional comments (1)
package.json (1)
28-28: Enhanced Manual Prerelease Publish Script
The"publish-manual-prerelease"script now includes the--canaryand--no-git-tag-versionflags. This ensures that prerelease versions are uniquely identified (by appending the commit hash) and that no Git tags are automatically created during the process, which aligns well with the improved CI flow.
MantisClone
left a comment
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.
Nice! Thanks for taking the time to look into this 🙏
Fixes #1503
Issue
The current
next-releasejob is broken:-next.0version (see an example here) ;package.jsonfiles, the following CI run also attempts to create the same-next.0version and cannot publish it. (see an example here)lerna ERR! E403 You cannot publish over the previously published versions: 0.19.10-next.0.Description of the changes
I've added the
--canaryoption (documentation here) to append the commit hash on prerelease versions. This option also takes care of incrementing the prerelease number from versions already existing on NPM.The next prerelease should be:
Summary by CodeRabbit