@@ -174,11 +174,17 @@ export async function getGitTags(opts: ReleaseOptions) {
174174 // compatible with old version
175175 const prefixMap : Record < string , string > = { } ;
176176 if ( isMonorepo ) {
177- pkgNames . forEach ( ( name ) => {
177+ pkgs . forEach ( ( pkg ) => {
178+ const { name, tagName } = pkg ;
178179 prefixMap [ getGitTagPrefix ( name , { isMonorepo, scopedTag : true , lineTag : false } ) ] = name ;
179180 prefixMap [ getGitTagPrefix ( name , { isMonorepo, scopedTag : false , lineTag : false } ) ] = name ;
180181 prefixMap [ getGitTagPrefix ( name , { isMonorepo, scopedTag : true , lineTag : true } ) ] = name ;
181182 prefixMap [ getGitTagPrefix ( name , { isMonorepo, scopedTag : false , lineTag : true } ) ] = name ;
183+
184+ prefixMap [ getGitTagPrefix ( tagName , { isMonorepo, scopedTag : true , lineTag : false } ) ] = name ;
185+ prefixMap [ getGitTagPrefix ( tagName , { isMonorepo, scopedTag : false , lineTag : false } ) ] = name ;
186+ prefixMap [ getGitTagPrefix ( tagName , { isMonorepo, scopedTag : true , lineTag : true } ) ] = name ;
187+ prefixMap [ getGitTagPrefix ( tagName , { isMonorepo, scopedTag : false , lineTag : true } ) ] = name ;
182188 } ) ;
183189 }
184190
@@ -306,7 +312,7 @@ export async function resetGitSubmit(opts: ReleaseOptions) {
306312
307313 // remote git tag
308314 for ( const pkg of pkgs ) {
309- const tag = getGitTagVersion ( pkg . name , pkg . version , opts ) ;
315+ const tag = getGitTagVersion ( pkg . tagName , pkg . version , opts ) ;
310316 const res = await run ( `git tag -l ${ tag } ` ) ;
311317 if ( res ) {
312318 await run ( `git tag -d ${ tag } ` ) ;
0 commit comments