chore(version): v0.1.0

This commit is contained in:
kangfenmao 2024-07-10 20:43:28 +08:00
parent 2b40ddc3ea
commit 8681bcd538
6 changed files with 71 additions and 10 deletions

View File

@ -33,6 +33,12 @@ jobs:
run: yarn build:linux
- name: build-mac
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_ID: ${{ vars.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ vars.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
if: matrix.os == 'macos-latest'
run: yarn build:mac

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ dist
out
.DS_Store
*.log*
.env
.env.*

View File

@ -1,4 +1,4 @@
appId: com.cherry-studio.app
appId: com.kangfenmao.CherryStudio
productName: Cherry Studio
directories:
buildResources: build
@ -12,7 +12,7 @@ files:
asarUnpack:
- resources/**
win:
executableName: cherry-studio
executableName: CherryStudio
nsis:
artifactName: ${name}-${version}-setup.${ext}
shortcutName: ${productName}
@ -43,3 +43,4 @@ publish:
url: https://example.com/auto-updates
electronDownload:
mirror: https://npmmirror.com/mirrors/electron/
afterSign: scripts/notarize.js

View File

@ -1,10 +1,10 @@
{
"name": "cherry-studio",
"version": "1.0.0",
"description": "An Electron application with React and TypeScript",
"version": "0.1.0",
"description": "A powerful AI assistant for producer.",
"main": "./out/main/index.js",
"author": "example.com",
"homepage": "https://electron-vite.org",
"author": "kangfenmao@qq.com",
"homepage": "https://github.com/kangfenmao/cherry-studio",
"scripts": {
"format": "prettier --write .",
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
@ -15,10 +15,10 @@
"dev": "electron-vite dev",
"build": "npm run typecheck && electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir",
"build:win": "npm run build && electron-builder --win",
"build:mac": "electron-vite build && electron-builder --mac",
"build:linux": "electron-vite build && electron-builder --linux"
"build:unpack": "dotenv npm run build && electron-builder --dir",
"build:win": "dotenv npm run build && electron-builder --win",
"build:mac": "dotenv electron-vite build && electron-builder --mac",
"build:linux": "dotenv electron-vite build && electron-builder --linux"
},
"dependencies": {
"@electron-toolkit/preload": "^3.0.0",
@ -42,6 +42,7 @@
"antd": "^5.18.3",
"browser-image-compression": "^2.0.2",
"dayjs": "^1.11.11",
"dotenv-cli": "^7.4.2",
"electron": "^28.2.0",
"electron-builder": "^24.9.1",
"electron-devtools-installer": "^3.2.0",

22
scripts/notarize.js Normal file
View File

@ -0,0 +1,22 @@
require('dotenv').config()
const { notarize } = require('@electron/notarize')
exports.default = async function notarizing(context) {
if (context.electronPlatformName !== 'darwin') {
return
}
const appName = context.packager.appInfo.productFilename
const notarized = await notarize({
appPath: `${context.appOutDir}/${appName}.app`,
appBundleId: 'com.kangfenmao.CherryStudio',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
})
console.log('Notarized:', notarized)
return notarized
}

View File

@ -359,6 +359,15 @@
fs-extra "^9.0.1"
promise-retry "^2.0.1"
"@electron/notarize@^2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.3.2.tgz#20a52a961747be8542a35003380988a0d3fe15e6"
integrity sha512-zfayxCe19euNwRycCty1C7lF7snk9YwfRpB5M8GLr1a4ICH63znxaPNAubrMvj0yDvVozqfgsdYpXVUnpWBDpg==
dependencies:
debug "^4.1.1"
fs-extra "^9.0.1"
promise-retry "^2.0.1"
"@electron/osx-sign@1.0.5":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@electron/osx-sign/-/osx-sign-1.0.5.tgz#0af7149f2fce44d1a8215660fd25a9fb610454d8"
@ -2244,11 +2253,31 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
dotenv-cli@^7.4.2:
version "7.4.2"
resolved "https://registry.yarnpkg.com/dotenv-cli/-/dotenv-cli-7.4.2.tgz#c158a818de08e1fbc51d310f628cbace9075b734"
integrity sha512-SbUj8l61zIbzyhIbg0FwPJq6+wjbzdn9oEtozQpZ6kW2ihCcapKVZj49oCT3oPM+mgQm+itgvUQcG5szxVrZTA==
dependencies:
cross-spawn "^7.0.3"
dotenv "^16.3.0"
dotenv-expand "^10.0.0"
minimist "^1.2.6"
dotenv-expand@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37"
integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==
dotenv-expand@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0"
integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==
dotenv@^16.3.0:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==
dotenv@^9.0.2:
version "9.0.2"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05"