File tree 2 files changed +13
-5
lines changed
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,11 @@ export async function runRelease({
180
180
}
181
181
182
182
/**
183
- * Changeset creates tags for staging releases as well,
184
- * but we should only push tags to Github for prod releases
183
+ * Push tags to Github for prod releases only.
185
184
*/
186
185
if ( releaseType === ReleaseType . Production && ! dryRun ) {
187
186
/**
188
- * Push release tags created by changeset in publish () to Github
187
+ * Push release tags created by changeset or publishInCI () to Github
189
188
*/
190
189
await pushReleaseTagsToGithub ( ) ;
191
190
}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export async function publishInCI(
43
43
dryRun : boolean
44
44
) {
45
45
const taskArray = [ ] ;
46
+ const tags = [ ] ;
46
47
for ( const pkg of updatedPkgs ) {
47
48
const path = await mapPkgNameToPkgPath ( pkg ) ;
48
49
@@ -79,8 +80,10 @@ export async function publishInCI(
79
80
continue ;
80
81
}
81
82
83
+ const tag = `${ pkg } @${ version } ` ;
84
+ tags . push ( tag ) ;
82
85
taskArray . push ( {
83
- title : `📦 ${ pkg } @ ${ version } ` ,
86
+ title : `📦 ${ tag } ` ,
84
87
task : ( ) => publishPackageInCI ( pkg , npmTag , dryRun )
85
88
} ) ;
86
89
}
@@ -91,7 +94,13 @@ export async function publishInCI(
91
94
} ) ;
92
95
93
96
console . log ( '\r\nPublishing Packages to NPM:' ) ;
94
- return tasks . run ( ) ;
97
+ await tasks . run ( ) ;
98
+
99
+ // Create git tags.
100
+ for ( const tag of tags ) {
101
+ await exec ( `git tag ${ tag } ` ) ;
102
+ console . log ( `Added git tag ${ tag } .` ) ;
103
+ }
95
104
}
96
105
97
106
async function publishPackageInCI (
You can’t perform that action at this time.
0 commit comments