@@ -17,6 +17,7 @@ import { logFatal, logInfo, spinner, logText } from '../../../utils/log';
1717import { getMonoAndNpmDepsOnce , DepMap } from '../../../utils/packages' ;
1818import { ProjectConfig , PackageInfo } from '../../../utils/define' ;
1919import { isOwner } from '../../../utils/npm' ;
20+ import { README_FILE } from '../../../utils/constants' ;
2021
2122export const publish = async ( options : PublishOption ) => {
2223 const currentBranchName = options . branch ? options . branch : await getCurrentBranchName ( ) ;
@@ -368,8 +369,10 @@ async function moveSourceFilesToTempFolderAndPublish(
368369 await copyDeclaration ( sourceType , publishTempName ) ;
369370 await fs . copy ( path . join ( targetRoot , 'package.json' ) , path . join ( tempRoot , 'package.json' ) ) ;
370371
371- if ( fs . existsSync ( path . join ( targetRoot , 'README.md' ) ) ) {
372- await fs . copy ( path . join ( targetRoot , 'README.md' ) , path . join ( tempRoot , 'README.md' ) ) ;
372+ if ( fs . existsSync ( path . join ( targetRoot , README_FILE ) ) ) {
373+ await fs . copy ( path . join ( targetRoot , README_FILE ) , path . join ( tempRoot , README_FILE ) ) ;
374+ } else if ( fs . existsSync ( path . join ( targetRoot , README_FILE . toLowerCase ( ) ) ) ) {
375+ await fs . copy ( path . join ( targetRoot , README_FILE . toLowerCase ( ) ) , path . join ( tempRoot , README_FILE ) ) ;
373376 }
374377
375378 // Add external deps
0 commit comments