-
Notifications
You must be signed in to change notification settings - Fork 277
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(workflows): add utils package build and release automation process #2838
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces modifications to multiple GitHub Actions workflow files and the package configuration to incorporate utility package building and publishing. The changes primarily focus on adding new steps in Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
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 (
|
概述此PR添加了utils包的构建和发布自动化流程,更新了相关的CI工作流配置文件和发布脚本,以支持新的utils包的自动化发布。 变更
|
@@ -36,7 +36,9 @@ const findAllpage = (packagesPath, updateVersion) => { | |||
}) | |||
} else { | |||
const content = fs.readFileSync(packagesPath).toString('UTF-8' as BufferEncoding) |
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.
Ensure that the replacement logic for package names is correct and does not unintentionally alter other parts of the file content.
[e2e-test-warn] The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug". Please make sure you've read our contributing guide |
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)
.github/workflows/dispatch-all-publish-alpha.yml (1)
92-92
: Consider splitting sequential publish commands.The command
pnpm pub:all && pnpm pub:utils && pnpm pub:site
has multiple failure points. If any command fails, subsequent commands won't execute.Consider splitting into separate steps for better error visibility:
- name: Publish Vue3 And Vue2 components run: pnpm pub:all env: NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }} - name: Publish Utils run: pnpm pub:utils env: NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }} - name: Publish Site run: pnpm pub:site env: NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}package.json (1)
85-85
: Include utils package in the pub:all script.The new
pub:utils
script follows the project's conventions and is properly configured. However, it should be included in thepub:all
script to ensure the utils package is published during full releases.Apply this diff to update the pub:all script:
- "pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeMobile && pnpm pub:themeSaas && pnpm pub:renderless && pnpm pub:runtime", + "pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeMobile && pnpm pub:themeSaas && pnpm pub:renderless && pnpm pub:runtime && pnpm pub:utils",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.github/workflows/auto-all-publish.yml
(1 hunks).github/workflows/dispatch-all-publish-alpha.yml
(1 hunks).github/workflows/dispatch-renderless-theme-publish-alpha.yml
(4 hunks)internals/cli/src/commands/release/releaseAlpha.ts
(2 hunks)package.json
(1 hunks)
🔇 Additional comments (9)
internals/cli/src/commands/release/releaseAlpha.ts (2)
39-41
: LGTM! Package name replacement logic is consistent.The addition of utils package name replacement follows the same pattern as the existing vue package replacement.
68-76
: LGTM! Utils directory added to release process.The utils directory has been appropriately added to the distLists array for processing during alpha releases.
.github/workflows/auto-all-publish.yml (2)
70-72
: LGTM! Build utils step added in correct sequence.The utils build step is appropriately positioned before the runtime build, following the established pattern of other build steps.
77-77
: Verify error handling in sequential publish commands.While the addition of
pnpm pub:utils
is correct, consider the failure scenario in the sequential execution. Ifpub:all
fails,pub:utils
won't execute.Consider adding error handling or splitting into separate steps for better visibility and control of failures.
.github/workflows/dispatch-all-publish-alpha.yml (1)
82-84
: LGTM! Build utils step matches auto-all-publish.yml.The utils build step is consistently implemented across workflows.
.github/workflows/dispatch-renderless-theme-publish-alpha.yml (3)
28-31
: LGTM! Improved module validation approach.The array-based validation is more maintainable than individual checks.
84-87
: LGTM! Conditional utils build step added.The build step correctly uses the same condition pattern as other modules.
97-103
: LGTM! Separate publish step for utils.Good practice to have a separate publish step with its own condition, making the workflow more maintainable and errors more traceable.
package.json (1)
85-85
: Verify utils package configuration.Please ensure that the package.json in the utils directory is properly configured with the correct package name, version, and access settings.
Run the following script to verify the utils package configuration:
✅ Verification successful
Package configuration verified and properly set up ✅
The utils package configuration is valid with proper package name, version, entry points, and TypeScript types defined. The public access is correctly enforced through the publish command.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify utils package configuration # Check if package.json exists in utils directory if [ -f "packages/utils/package.json" ]; then echo "Utils package.json found. Checking configuration..." # Extract and display relevant configuration cat packages/utils/package.json | jq '{ name: .name, version: .version, private: .private, access: .publishConfig.access, main: .main, module: .module, types: .types }' else echo "Error: packages/utils/package.json not found" exit 1 fiLength of output: 533
PR
添加utils包构建发布自动化流程
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
Workflow Updates
Package Management
Release Process