🐎 ci: 添加版本信息

This commit is contained in:
imsyy
2023-12-13 10:14:54 +08:00
parent 024ff1773e
commit 2db74f3a39
3 changed files with 18 additions and 12 deletions

View File

@@ -39,15 +39,18 @@ jobs:
path: |
dist/*.exe
dist/*.msi
dist/latest.yml
# 创建 GitHub Release
- name: Release
uses: softprops/action-gh-release@v0.1.15
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
if-no-files-found: ignore
files: |
dist/*.exe
dist/*.msi
dist/latest.yml
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# Mac
@@ -81,15 +84,18 @@ jobs:
path: |
dist/*.dmg
dist/*.zip
dist/latest-mac.yml
# 创建 GitHub Release
- name: Release
uses: softprops/action-gh-release@v0.1.15
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
if-no-files-found: ignore
files: |
dist/*.dmg
dist/*.zip
dist/latest-mac.yml
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# Linux
@@ -127,15 +133,20 @@ jobs:
dist/*.AppImage
dist/*.deb
dist/*.rpm
dist/*.tar.gz
dist/latest-linux.yml
# 创建 GitHub Release
- name: Release
uses: softprops/action-gh-release@v0.1.15
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
if-no-files-found: ignore
files: |
dist/*.AppImage
dist/*.deb
dist/*.rpm
dist/*.tar.gz
dist/latest-linux.yml
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

View File

@@ -23,9 +23,7 @@ win:
# 应用程序的图标文件路径
icon: public/images/logo/favicon_256.png
# 构建类型
target:
- nsis
- portable
target: nsis
# 管理员权限
requestedExecutionLevel: highestAvailable
# NSIS 安装器配置
@@ -75,7 +73,6 @@ linux:
# 构建类型
target:
- AppImage
- snap
- deb
- rpm
- tar.gz

View File

@@ -88,10 +88,9 @@ class MainProcess {
}
// 非开发环境启动代理
// if (!is.dev) {
// this.mainServer = await startMainServer();
// }
this.mainServer = await startMainServer();
if (!is.dev) {
this.mainServer = await startMainServer();
}
// 注册应用协议
app.setAsDefaultProtocolClient("splayer");
@@ -153,10 +152,9 @@ class MainProcess {
this.mainWindow.loadURL(process.env.ELECTRON_RENDERER_URL);
}
// 生产模式
// else {
// this.mainWindow.loadURL(`http://127.0.0.1:${import.meta.env.MAIN_VITE_MAIN_PORT ?? 7899}`);
// }
this.mainWindow.loadURL(`http://127.0.0.1:${import.meta.env.MAIN_VITE_MAIN_PORT ?? 7899}`);
else {
this.mainWindow.loadURL(`http://127.0.0.1:${import.meta.env.MAIN_VITE_MAIN_PORT ?? 7899}`);
}
// 监听关闭
this.mainWindow.on("close", (event) => {