diff --git a/.github/workflows/release-tauri.yaml b/.github/workflows/release-tauri.yaml index ae2e74a6..16cd49de 100644 --- a/.github/workflows/release-tauri.yaml +++ b/.github/workflows/release-tauri.yaml @@ -1,6 +1,7 @@ name: 'publish tauri' on: + workflow_dispatch: push: branches: - release_tauri @@ -78,6 +79,20 @@ jobs: } else if ('${{ matrix.platform }}'.startsWith('macos')) { // change product name for macos if (process.env.MACOS_PRODUCT_NAME) cfg.package.productName = process.env.MACOS_PRODUCT_NAME; + // only work for release + if ('${{ github.ref_name }}'.startsWith('release')) { + // add sign for macos + if (APPLE_CERTIFICATE.length > 16) { + core.exportVariable("APPLE_CERTIFICATE", APPLE_CERTIFICATE); + core.exportVariable("APPLE_CERTIFICATE_PASSWORD", "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}"); + core.exportVariable("APPLE_SIGNING_IDENTITY", "${{ secrets.APPLE_SIGNING_IDENTITY }}"); + core.notice("符合签名条件", {title:"本次构建将会对MacOS目标进行签名"}); + } else { + core.warning("未提供有效证书", {title:"本次构建将不会对MacOS目标进行签名"}); + } + } else { + core.warning("当前构建源不是release分支", {title:"本次构建将不会对MacOS目标进行签名"}); + } } else if ('${{ matrix.platform }}'.startsWith('windows')) { // change package version for windows const versionMatch = cfg.package.version.match('^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){2}(0|6[0-5][0-5][0-3][0-5]|[1-5][0-9][0-9][0-9][0-9]|[1-9][0-9]{0,3})'); diff --git a/package.json b/package.json index ae1a813e..32096b08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ceobe-canteen-electron", - "version": "1.0.0-rc1", + "version": "1.0.0-rc2", "private": true, "description": "帮小刻找好多好吃的饼", "author": "CeobeCanteen", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 33ffc447..2888ba96 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ceobe-canteen-desktop" -version = "1.0.0-rc1" +version = "1.0.0-rc2" description = "小刻食堂的桌面端,恭喜你电脑有多了个和小刻一样喜欢吃东西的浏览器内核 " authors = ["FrozenString"] license="AGPL-3" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 73bcd38e..0a10479b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,8 +8,8 @@ "withGlobalTauri": true }, "package": { - "productName": "小刻食堂", - "version": "1.0.0-rc1" + "productName": "CeobeCanteen", + "version": "1.0.0-rc2" }, "tauri": { "systemTray": {