build(签名流程): 优化签名流程以减少SignPath配额使用,添加相关控制

- 配置electron-builder仅使用SHA256算法签名,避免双签名以减半配额消耗
- 为签名脚本添加配额耗尽处理,超出后跳过后续签名任务
- 新增仅签名主安装包选项和发布工作流签名开关
- 在发布笔记中添加签名状态展示
- 更新自动更新文档,补充SignPath配额问题及解决方案
This commit is contained in:
2026-08-28 03:18:18 +08:00
parent 30451d505c
commit b404ffaef8
6 changed files with 58 additions and 5 deletions
+11 -1
View File
@@ -46,6 +46,11 @@ on:
description: '基础版本号,如 1.2.0'
required: true
default: '1.2.0'
sign:
description: '是否使用 SignPath 签名(配额不足时自动跳过)'
required: true
type: boolean
default: true
permissions:
contents: write
@@ -56,11 +61,15 @@ jobs:
# 声明使用 Environment "BUILDER",才能读取其中的环境 Secret SIGNPATH_API_TOKEN
environment: BUILDER
env:
SIGNPATH_API_TOKEN: ${{ secrets.SIGNPATH_API_TOKEN }}
# 勾选 sign 才注入 token 走 SignPath 签名;不勾选则 token 为空,模块自动跳过签名
SIGNPATH_API_TOKEN: ${{ inputs.sign && secrets.SIGNPATH_API_TOKEN || '' }}
SIGNPATH_ORG_ID: 31ecd033-d59e-492b-a70b-b00a54bbc7c2
SIGNPATH_PROJECT_SLUG: Koring_Launcher
SIGNPATH_SIGNING_POLICY_SLUG: Koring_Launcher_Dev_builder
SIGNPATH_ARTIFACT_CONFIG_SLUG: ${{ secrets.SIGNPATH_ARTIFACT_CONFIG_SLUG }}
# 内部测试阶段:SignPath 年度配额(约 500MB)耗尽时跳过签名、照常发布(产物未签名)。
# ⚠️ 正式发布请删除此行并升级 SignPath 套餐(同时建议 SIGNPATH_ONLY_INSTALLER=false 全量签名)。
SIGNPATH_SKIP_ON_QUOTA: 'true'
steps:
- uses: actions/checkout@v4
with:
@@ -113,6 +122,7 @@ jobs:
-BaseVersion "${{ inputs.version }}" `
-FullVersion "${{ steps.version.outputs.full }}" `
-Mode "${{ inputs.mode }}" `
-SigningStatus "${{ inputs.sign && '已签名' || '未签名' }}" `
-OutputPath release-notes.md
- name: Publish GitHub Release