Skip to content

Commit 03aba01

Browse files
committed
publish even no changeset
1 parent 6a0c4ad commit 03aba01

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dev": "turbo run dev --parallel",
1515
"pack-next": "tsx scripts/pack-next.ts",
1616
"ci:version": "tsx ./scripts/release/version-packages.ts",
17-
"ci:publish": "changeset publish",
17+
"ci:publish": "tsx ./scripts/release/publish-npm.ts",
1818
"test-types": "tsc",
1919
"test-unit": "jest test/unit/ packages/next/ packages/font",
2020
"test-dev": "cross-env NEXT_TEST_MODE=dev pnpm testheadless",

scripts/release/publish-npm.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import execa from 'execa'
2+
3+
async function publishNpm() {
4+
const releaseType = process.env.RELEASE_TYPE
5+
const tag =
6+
releaseType === 'canary'
7+
? 'canary'
8+
: releaseType === 'release-candidate'
9+
? 'rc'
10+
: 'latest'
11+
12+
await execa('pnpm', ['publish', '--recursive', '--tag', tag], {
13+
stdio: 'inherit',
14+
})
15+
await execa('pnpm', ['changeset', 'tag'], {
16+
stdio: 'inherit',
17+
})
18+
}
19+
20+
publishNpm()

0 commit comments

Comments
 (0)