This commit is contained in:
zhanggy committed 2025-11-05 14:46:49 +08:00
1 parent fc250c54ed
commit 5eec516459
62 files changed
+3912 -3376

No files matched your search

+31 -31
View File
@@ -1,8 +1,8 @@
/* eslint-disable no-template-curly-in-string */
const dotenv = require('dotenv')
const packageJson = require('../../package.json')
const dotenv = require('dotenv');
const packageJson = require('../../package.json');
dotenv.config()
dotenv.config();
const baseConfig = {
productName: packageJson.name,
@@ -16,12 +16,12 @@ const baseConfig = {
owner: 'Jasery',
repo: 'gdt-tool',
releaseType: 'release',
token: process.env.GITHUB_TOKEN || process.env.GH_TOKEN || '' // 优先使用 GITHUB_TOKEN(GitHub Actions 自动提供)
}
token: process.env.GITHUB_TOKEN || process.env.GH_TOKEN || '', // 优先使用 GITHUB_TOKEN(GitHub Actions 自动提供)
},
],
artifactName: '${productName} ${version}_${arch}.${ext}',
directories: {
output: './release/${version}'
output: './release/${version}',
},
mac: {
bundleVersion: '1.0',
@@ -33,9 +33,9 @@ const baseConfig = {
target: [
{
target: 'dmg',
arch: ['x64', 'arm64', 'universal']
}
]
arch: ['x64', 'arm64', 'universal'],
},
],
},
dmg: {
contents: [
@@ -43,15 +43,15 @@ const baseConfig = {
x: 410,
y: 150,
type: 'link',
path: '/Applications'
path: '/Applications',
},
{
x: 130,
y: 150,
type: 'file'
}
type: 'file',
},
],
sign: false
sign: false,
},
win: {
icon: 'buildAssets/icons/icon.ico',
@@ -70,15 +70,15 @@ const baseConfig = {
// },
{
target: 'nsis',
arch: 'x64'
}
]
arch: 'x64',
},
],
},
portable: {
artifactName: '${productName} ${version}_${arch} Portable.${ext}'
artifactName: '${productName} ${version}_${arch} Portable.${ext}',
},
nsis: {
oneClick: true
oneClick: true,
},
linux: {
executableName: packageJson.name.toLowerCase(),
@@ -87,21 +87,21 @@ const baseConfig = {
target: [
{
target: 'snap',
arch: 'x64'
arch: 'x64',
},
{
target: 'deb',
arch: 'x64'
arch: 'x64',
},
{
target: 'rpm',
arch: 'x64'
}
]
}
}
arch: 'x64',
},
],
},
};
baseConfig.copyright = `ⓒ ${new Date().getFullYear()} $\{author}`
baseConfig.copyright = `ⓒ ${new Date().getFullYear()} $\{author}`;
baseConfig.files = [
/* A list of files not to be included in the build. */
/*
@@ -111,11 +111,11 @@ baseConfig.files = [
'!dist/main/index.dev.js',
'!docs/**/*',
'!tests/**/*',
'!release/**/*'
]
'!release/**/*',
];
// TODO: Notarize for macOS
baseConfig.mac.identity = null
baseConfig.mac.identity = null;
/* if (process.env.MAC_NOTARIZE === 'true') {
baseConfig.afterSign = './buildAssets/builder/notarize.ts'
} else {
@@ -123,5 +123,5 @@ baseConfig.mac.identity = null
} */
module.exports = {
...baseConfig
}
...baseConfig,
};