From 3088b87417c859cfc3335842b1812302bc91d7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=90=91=E5=A4=9C?= <46275354+fu050409@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:29:29 -0400 Subject: [PATCH] ci(release): add publish option for changeset ci (#51) --- .github/workflows/release.yml | 1 + package.json | 1 + scripts/bump.mjs | 1 - scripts/release.mjs | 3 +++ 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 scripts/release.mjs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 571466b..f1a5388 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,3 +36,4 @@ jobs: version: pnpm bump title: "chore(release): version packages" commit: "chore(release): version packages" + publish: pnpm release diff --git a/package.json b/package.json index 328ac15..4ae996a 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "preview": "vite preview", "tauri": "tauri", "bump": "node scripts/bump.mjs", + "release": "node scripts/release.mjs", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", "docs:preview": "vitepress preview docs" diff --git a/scripts/bump.mjs b/scripts/bump.mjs index 815f034..22d5adb 100644 --- a/scripts/bump.mjs +++ b/scripts/bump.mjs @@ -5,7 +5,6 @@ import { fileURLToPath } from 'url'; execSync('npx changeset version', { stdio: 'inherit' }); execSync('pnpm install --no-frozen-lockfile', { stdio: 'inherit' }); -execSync('npx changeset tag', { stdio: 'inherit' }); const __dirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/scripts/release.mjs b/scripts/release.mjs new file mode 100644 index 0000000..1a97910 --- /dev/null +++ b/scripts/release.mjs @@ -0,0 +1,3 @@ +import { execSync } from 'child_process'; + +execSync('npx changeset tag', { stdio: 'inherit' });