Merge 03c52e1ee81958b035ddf8368a1ff0ddb0b85dd2 into 1b411d36335bed23505b00c277e4425e66b685d7

This commit is contained in:
Levin AI 2025-03-27 13:50:45 +08:00 committed by GitHub
commit 94466a4c85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 3 deletions

35
.github/workflows/release-npm.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Publish Package to NPM
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build package
run: pnpm run build
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --access public --no-git-checks

View File

@ -37,10 +37,12 @@ export async function createServer(
logger.info(colors.cyan(`\n waiting for electron to exit...`))
ps.removeAllListeners()
ps.on('exit', () => {
logger.info(colors.green(`\napp has been shut down...`))
ps = startElectron(inlineConfig.root)
logger.info(colors.green(`\nrestart electron app...`))
})
ps.kill()
ps = startElectron(inlineConfig.root)
logger.info(colors.green(`\nrestart electron app...`))
}
}