@@ -18,14 +18,17 @@ async function main() {
18
18
19
19
// Commit
20
20
await commitVersionChanges ( version ) ;
21
-
22
- // Publish
21
+
22
+ // Get packages ready for publishing
23
23
const publicPackages = await getPublicPackages ( ) ;
24
24
validatePackages ( publicPackages ) ;
25
+
26
+ // Publish
25
27
await publishPackages ( publicPackages , version ) ;
26
28
await publishRustClient ( version ) ;
27
29
28
30
// Create GitHub release
31
+ await createAndPushTag ( version ) ;
29
32
await createGitHubRelease ( version ) ;
30
33
}
31
34
@@ -90,6 +93,22 @@ async function cleanWorkspace() {
90
93
}
91
94
}
92
95
96
+ async function createAndPushTag ( version : string ) {
97
+ console . log ( chalk . blue ( `Creating tag v${ version } ...` ) ) ;
98
+ try {
99
+ // Create tag and force update if it exists
100
+ await $ `git tag -f v${ version } ` ;
101
+
102
+ // Push tag with force to ensure it's updated
103
+ await $ `git push origin v${ version } -f` ;
104
+
105
+ console . log ( chalk . green ( `✅ Tag v${ version } created and pushed` ) ) ;
106
+ } catch ( err ) {
107
+ console . error ( chalk . red ( "❌ Failed to create or push tag" ) , err ) ;
108
+ process . exit ( 1 ) ;
109
+ }
110
+ }
111
+
93
112
async function publishRustClient ( version : string ) {
94
113
console . log ( chalk . blue ( "Publishing Rust client..." ) ) ;
95
114
@@ -176,8 +195,6 @@ async function commitVersionChanges(version: string) {
176
195
chalk . yellow ( "! Failed to push branch. You may need to push manually." ) ,
177
196
) ;
178
197
}
179
-
180
- await $ `git push --tags -f` ;
181
198
}
182
199
183
200
async function getPublicPackages ( ) {
0 commit comments