add release ci

This commit is contained in:
geekgeekrun
2024-04-08 09:35:20 +08:00
parent c112ef691b
commit 9b4c73bc44
9 changed files with 169 additions and 31 deletions
@@ -0,0 +1,11 @@
import { execSync } from 'child_process'
import { getPackageInfo } from './increase-package-version.mjs'
export default async function releaseVersion() {
execSync(`git add -A`)
const packageInfo = JSON.parse(getPackageInfo().toString('utf-8'))
const tagName = `ui-v${packageInfo.version}`
execSync(`git commit -m ${tagName}`, { stdio: ['inherit', 'inherit', 'inherit'] })
execSync(`git tag ${tagName}`, { stdio: ['inherit', 'inherit', 'inherit'] })
execSync(`git push origin ${tagName}`, { stdio: ['inherit', 'inherit', 'inherit'] })
}