Skip to content

Commit 50dd6ae

Browse files
committed
build: support releasing as next
1 parent a4b50ec commit 50dd6ae

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/npm-publish.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from 'path';
22
import { spawn } from 'child_process';
3-
import { input } from '@inquirer/prompts';
3+
import { input, select } from '@inquirer/prompts';
44
import { executeCommand } from '../runner/utils/exec.js';
55
import { readFile, writeFile } from 'fs/promises';
66

@@ -20,6 +20,14 @@ const registry = 'https://wombat-dressing-room.appspot.com';
2020
required: true,
2121
});
2222

23+
const distTag = await select({
24+
choices: [
25+
{ name: 'Pre-release', value: 'next' },
26+
{ name: 'Stable', value: 'latest' },
27+
],
28+
message: 'Select a release channel',
29+
});
30+
2331
// Build the project.
2432
await executeCommand(
2533
`pnpm release-build --version=${version}`,
@@ -36,7 +44,7 @@ const registry = 'https://wombat-dressing-room.appspot.com';
3644

3745
// Publish to npm.
3846
await executeCommand(
39-
`npm --registry ${registry} publish --access public --tag latest`,
47+
`npm --registry ${registry} publish --access public --tag ${distTag}`,
4048
distDirectory,
4149
undefined,
4250
{

0 commit comments

Comments
 (0)