mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-04-06 04:05:44 +08:00
Merge 03c52e1ee81958b035ddf8368a1ff0ddb0b85dd2 into 1b411d36335bed23505b00c277e4425e66b685d7
This commit is contained in:
commit
94466a4c85
35
.github/workflows/release-npm.yml
vendored
Normal file
35
.github/workflows/release-npm.yml
vendored
Normal 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
|
@ -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...`))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user