From 14290aceeab9bc3d10b50043c5e08ae75133c848 Mon Sep 17 00:00:00 2001 From: Yun Shan <14977331+Yun-Shan@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:59:09 +0800 Subject: [PATCH 1/7] Update release-tauri.yaml --- .github/workflows/release-tauri.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release-tauri.yaml b/.github/workflows/release-tauri.yaml index ae2e74a6..1e469cf2 100644 --- a/.github/workflows/release-tauri.yaml +++ b/.github/workflows/release-tauri.yaml @@ -1,9 +1,11 @@ name: 'publish tauri' on: + workflow_dispatch: push: branches: - release_tauri + - release env: CUSTOM_RELEASE_ASSET_NAME: 'CeobeCanteen' @@ -78,6 +80,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 }}' === 'release') { + // add sign for macos + const sign = '${{ secrets.MACOS_SIGN_IDENTITY }}'; + if (sign.length > 16) { + if (!cfg.bundle) cfg.bundle = {}; + if (!cfg.bundle.macOS) cfg.bundle.macOS = {}; + cfg.bundle.macOS.signingIdentity = sign; + } else { + console.log("::warning file=release-tauri.yaml,line=91,endLine=91,title=本次构建将不会对MacOS目标进行签名::未提供有效signingIdentity"); + } + } else { + console.log("::notice file=release-tauri.yaml,line=94,endLine=94,title=本次构建将不会对MacOS目标进行签名::当前构建源不是release分支"); + } } 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})'); From f28b41d1376473a823edbd76dd597ffad009b940 Mon Sep 17 00:00:00 2001 From: Yun Shan <14977331+Yun-Shan@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:59:52 +0800 Subject: [PATCH 2/7] Update release-tauri.yaml --- .github/workflows/release-tauri.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-tauri.yaml b/.github/workflows/release-tauri.yaml index 1e469cf2..3589501f 100644 --- a/.github/workflows/release-tauri.yaml +++ b/.github/workflows/release-tauri.yaml @@ -4,7 +4,6 @@ on: workflow_dispatch: push: branches: - - release_tauri - release env: From 30fc1342ab8e3a7f2ab54e13ea3449d2d6dc9cb3 Mon Sep 17 00:00:00 2001 From: Yun Shan <14977331+Yun-Shan@users.noreply.github.com> Date: Sun, 1 Oct 2023 22:13:13 +0800 Subject: [PATCH 3/7] Update release-tauri.yaml --- .github/workflows/release-tauri.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-tauri.yaml b/.github/workflows/release-tauri.yaml index 3589501f..1616af33 100644 --- a/.github/workflows/release-tauri.yaml +++ b/.github/workflows/release-tauri.yaml @@ -82,16 +82,16 @@ jobs: // only work for release if ('${{ github.ref_name }}' === 'release') { // add sign for macos - const sign = '${{ secrets.MACOS_SIGN_IDENTITY }}'; - if (sign.length > 16) { - if (!cfg.bundle) cfg.bundle = {}; - if (!cfg.bundle.macOS) cfg.bundle.macOS = {}; - cfg.bundle.macOS.signingIdentity = sign; + 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 { - console.log("::warning file=release-tauri.yaml,line=91,endLine=91,title=本次构建将不会对MacOS目标进行签名::未提供有效signingIdentity"); + core.warning("未提供有效证书", {title:"本次构建将不会对MacOS目标进行签名"}); } } else { - console.log("::notice file=release-tauri.yaml,line=94,endLine=94,title=本次构建将不会对MacOS目标进行签名::当前构建源不是release分支"); + core.warning("当前构建源不是release分支", {title:"本次构建将不会对MacOS目标进行签名"}); } } else if ('${{ matrix.platform }}'.startsWith('windows')) { // change package version for windows From d9de871be0351d3a34f69448290e01e9ea7e6147 Mon Sep 17 00:00:00 2001 From: Yun Shan <14977331+Yun-Shan@users.noreply.github.com> Date: Sun, 1 Oct 2023 22:15:42 +0800 Subject: [PATCH 4/7] Update release-tauri.yaml --- .github/workflows/release-tauri.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-tauri.yaml b/.github/workflows/release-tauri.yaml index 1616af33..16cd49de 100644 --- a/.github/workflows/release-tauri.yaml +++ b/.github/workflows/release-tauri.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - release + - release_tauri env: CUSTOM_RELEASE_ASSET_NAME: 'CeobeCanteen' @@ -80,7 +80,7 @@ jobs: // 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 }}' === 'release') { + if ('${{ github.ref_name }}'.startsWith('release')) { // add sign for macos if (APPLE_CERTIFICATE.length > 16) { core.exportVariable("APPLE_CERTIFICATE", APPLE_CERTIFICATE); From dd5c0fc1f19516e316d700673b8aebc5df570058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8A=E5=BC=A6=E5=87=9D=E7=BB=9D?= <42119608+Goodjooy@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:55:05 +0800 Subject: [PATCH 5/7] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4dd15566..32096b08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ceobe-canteen-electron", - "version": "0.1.8", + "version": "1.0.0-rc2", "private": true, "description": "帮小刻找好多好吃的饼", "author": "CeobeCanteen", From 6998f6797357dfc1fb1413d8af5d342972100da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8A=E5=BC=A6=E5=87=9D=E7=BB=9D?= <42119608+Goodjooy@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:55:24 +0800 Subject: [PATCH 6/7] Update tauri.conf.json --- src-tauri/tauri.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d582799a..e9325bb1 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "CeobeCanteen", - "version": "0.1.8" + "version": "1.0.0-rc2" }, "tauri": { From 8d43c355a41a9c127b9b88a454b631e6b6f6b307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8A=E5=BC=A6=E5=87=9D=E7=BB=9D?= <42119608+Goodjooy@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:55:57 +0800 Subject: [PATCH 7/7] Update Cargo.toml --- src-tauri/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 19d0dde1..d9a2a028 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ceobe-canteen-desktop" -version = "0.1.8" +version = "1.0.0-rc2" description = "小刻食堂的桌面端,恭喜你电脑有多了个和小刻一样喜欢吃东西的浏览器内核 " authors = ["FrozenString"] license = "AGPL-3"