Skip to content

Commit 9352be5

Browse files
committed
chore: update release script to manually tag
1 parent cb387ed commit 9352be5

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

scripts/release.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ async function main() {
1818

1919
// Commit
2020
await commitVersionChanges(version);
21-
22-
// Publish
21+
22+
// Get packages ready for publishing
2323
const publicPackages = await getPublicPackages();
2424
validatePackages(publicPackages);
25+
26+
// Publish
2527
await publishPackages(publicPackages, version);
2628
await publishRustClient(version);
2729

2830
// Create GitHub release
31+
await createAndPushTag(version);
2932
await createGitHubRelease(version);
3033
}
3134

@@ -90,6 +93,22 @@ async function cleanWorkspace() {
9093
}
9194
}
9295

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+
93112
async function publishRustClient(version: string) {
94113
console.log(chalk.blue("Publishing Rust client..."));
95114

@@ -176,8 +195,6 @@ async function commitVersionChanges(version: string) {
176195
chalk.yellow("! Failed to push branch. You may need to push manually."),
177196
);
178197
}
179-
180-
await $`git push --tags -f`;
181198
}
182199

183200
async function getPublicPackages() {

0 commit comments

Comments
 (0)