diff --git a/tools/release/index.ts b/tools/release/index.ts index ccaf4e9bf2..74b193bb4c 100644 --- a/tools/release/index.ts +++ b/tools/release/index.ts @@ -219,43 +219,43 @@ registryTask(__filename, 'release', async () => { // await registryChangelog(__filename); const { masterTag } = getVersion(); - // await registryBuild(__filename); + await registryBuild(__filename); - // await registryCheck(__filename); + await registryCheck(__filename); - // await registryTask(__filename, 'release check', async () => { - // await registryCheckSass(__filename); - // await registryTask(__filename, 'check git tag', checkTags); - // await registryTask(__filename, 'check build outputs', checkFiles); - // }); - // await registryTask(__filename, 'publish to npm', async () => { - // const { version } = getVersion(); - // const versionTag = version.match(/[a-z]+/)?.[0]; - // const distTag: string = - // ARGV.tag || - // versionTag || - // ( - // await inquirer.prompt({ - // name: 'tag', - // type: 'list', - // choices: ['latest', 'next', 'beta'], - // default: 0, - // message: 'publish dist-tags:', - // }) - // ).tag; - // await registryTask(__filename, 'publish next to npm', publishNpm.bind(undefined, distTag)); - // await registryTask( - // __filename, - // 'publish next-docs to npm', - // publishNpmForDocs.bind(undefined, distTag), - // () => { - // fs.removeSync(NEXT_DOCS_PATH); - // } - // ); - // await registryTask(__filename, 'tnpm sync', () => { - // execSync('tnpm', ['sync', '@alifd/next', NEXT_DOCS_NAME]); - // }); - // }); + await registryTask(__filename, 'release check', async () => { + await registryCheckSass(__filename); + await registryTask(__filename, 'check git tag', checkTags); + await registryTask(__filename, 'check build outputs', checkFiles); + }); + await registryTask(__filename, 'publish to npm', async () => { + const { version } = getVersion(); + const versionTag = version.match(/[a-z]+/)?.[0]; + const distTag: string = + ARGV.tag || + versionTag || + ( + await inquirer.prompt({ + name: 'tag', + type: 'list', + choices: ['latest', 'next', 'beta'], + default: 0, + message: 'publish dist-tags:', + }) + ).tag; + await registryTask(__filename, 'publish next to npm', publishNpm.bind(undefined, distTag)); + await registryTask( + __filename, + 'publish next-docs to npm', + publishNpmForDocs.bind(undefined, distTag), + () => { + fs.removeSync(NEXT_DOCS_PATH); + } + ); + await registryTask(__filename, 'tnpm sync', () => { + execSync('tnpm', ['sync', '@alifd/next', NEXT_DOCS_NAME]); + }); + }); const commitRollbackFns = new Set<() => unknown>(); await registryTask(