Skip to content

Commit

Permalink
Merge pull request #20 from Enraged-Dun-Cookie-Development-Team/relea…
Browse files Browse the repository at this point in the history
…se_tauri-1

Update release-tauri.yaml
  • Loading branch information
Goodjooy authored Oct 2, 2023
2 parents 4a89151 + 5a9fa0d commit eddcd4c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release-tauri.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'publish tauri'

on:
workflow_dispatch:
push:
branches:
- release_tauri
Expand Down Expand Up @@ -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})');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ceobe-canteen-electron",
"version": "1.0.0-rc1",
"version": "1.0.0-rc2",
"private": true,
"description": "帮小刻找好多好吃的饼",
"author": "CeobeCanteen",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ceobe-canteen-desktop"
version = "1.0.0-rc1"
version = "1.0.0-rc2"
description = "小刻食堂的桌面端,恭喜你电脑有多了个和小刻一样喜欢吃东西的浏览器内核 "
authors = ["FrozenString<frozenstringstable@gmail.com>"]
license="AGPL-3"
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"withGlobalTauri": true
},
"package": {
"productName": "小刻食堂",
"version": "1.0.0-rc1"
"productName": "CeobeCanteen",
"version": "1.0.0-rc2"
},
"tauri": {
"systemTray": {
Expand Down

0 comments on commit eddcd4c

Please sign in to comment.