Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto-all-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: pnpm build:runtime

- name: Publish Vue3 And Vue2 components
run: pnpm pub:all && pnpm pub:utils && pnpm pub:hooks
run: pnpm pub:all && pnpm pub:runtime && pnpm pub:utils && pnpm pub:hooks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dispatch-all-publish-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ jobs:
run: pnpm release:alpha

- name: Publish Vue3 And Vue2 components
run: pnpm pub:all && pnpm pub:utils && pnpm pub:hooks && pnpm pub:site
run: pnpm pub:all && pnpm pub:runtime && pnpm pub:utils && pnpm pub:hooks && pnpm pub:site
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}
7 changes: 7 additions & 0 deletions .github/workflows/dispatch-renderless-theme-publish-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}

- name: Publish Runtime
if: contains(inputs.components, 'runtime') == true
run: |
pnpm pub:runtime
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}

- name: Publish Hooks
if: contains(inputs.components, 'hooks') == true
run: |
Expand Down
20 changes: 17 additions & 3 deletions internals/cli/src/commands/release/releaseAlpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,22 @@ const findAllpage = (packagesPath, updateVersion) => {
.replace(/@opentiny\/vue/g, '@opentinyvue/vue')
.replace(/@opentiny\/utils/g, '@opentinyvue/utils')

if (packagesPath.endsWith('package.json') && updateVersion) {
if (packagesPath.endsWith('package.json')) {
const packageJSON = JSON.parse(result)
packageJSON.version = getPatchVersion(packageJSON.name, packageJSON.version)
const dependenciesVersion = `~${packageJSON.version.split('.').slice(0, 2).join('.')}.0`

if (updateVersion) {
packageJSON.version = getPatchVersion(packageJSON.name, packageJSON.version)
}

if (packageJSON.dependencies) {
Object.keys(packageJSON.dependencies).forEach((key) => {
if (packageJSON.dependencies[key] === 'workspace:~') {
packageJSON.dependencies[key] = dependenciesVersion
}
})
}

fs.writeFileSync(packagesPath, JSON.stringify(packageJSON, null, 2) + '\n')
} else {
fs.writeFileSync(packagesPath, result)
Expand Down Expand Up @@ -73,7 +86,8 @@ export const releaseAlpha = ({ updateVersion }) => {
'theme-mobile/dist',
'theme-saas/dist',
'utils',
'vue-hooks'
'vue-hooks',
'vue-runtime'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that adding vue-runtime to the distribution list does not introduce any unintended side effects or dependencies that might affect the release process.

]
distLists.forEach((item) => {
findAllpage(pathFromPackages(item), updateVersion)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"pub:runtime": "pnpm --filter=\"./packages/vue-runtime/\" publish --no-git-checks --access=public",
"pub:utils": "pnpm --filter=\"./packages/utils/\" publish --no-git-checks --access=public",
"pub:hooks": "pnpm --filter=\"./packages/vue-hooks/\" publish --no-git-checks --access=public",
"pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeSaas && pnpm pub:renderless && pnpm pub:runtime",
"pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeSaas && pnpm pub:renderless",
"pub:site": "pnpm -C examples/sites pub",
"// ---------- 自动化发测试包 ----------": "",
"auto-build-pub": "pnpm -C internals/automate auto-build-pub",
Expand Down
Loading