Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: 桌面安装包构建与验收

on:
workflow_dispatch:
inputs:
platform:
description: 构建平台
type: choice
default: win
options: [win, linux, mac, all]
workflow_call:
inputs:
sign:
Expand Down Expand Up @@ -32,16 +39,13 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
platform: win
arch: x64
- os: ubuntu-24.04
platform: linux
arch: x64
- os: macos-15
platform: mac
arch: arm64
include: >-
${{ fromJSON(
inputs.platform == 'win' && '[{"os":"windows-2022","platform":"win","arch":"x64"}]' ||
inputs.platform == 'linux' && '[{"os":"ubuntu-24.04","platform":"linux","arch":"x64"}]' ||
inputs.platform == 'mac' && '[{"os":"macos-15","platform":"mac","arch":"arm64"}]' ||
'[{"os":"windows-2022","platform":"win","arch":"x64"},{"os":"ubuntu-24.04","platform":"linux","arch":"x64"},{"os":"macos-15","platform":"mac","arch":"arm64"}]'
) }}
defaults:
run:
shell: bash
Expand Down
13 changes: 8 additions & 5 deletions docs/发布流程.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

## 工作流

| 入口 | 触发条件 | 行为 |
| --------------------------------------- | -------------------------- | ----------------------------------------------- |
| `.github/workflows/ci.yml` | PR、手动运行、发布流程调用 | 格式、类型、完整测试与构建;PR 另验收桌面安装包 |
| `.github/workflows/release-desktop.yml` | `desktop-v*` tag | 检查 → 各平台打包与验收 → Release 草稿 |
| `.github/workflows/release-cli.yml` | `cli-v*` tag | 检查 → CLI 打包与验收 → npm 发布 |
| 入口 | 触发条件 | 行为 |
| --------------------------------------- | --------------------------- | ----------------------------------------------- |
| `.github/workflows/ci.yml` | PR、手动运行、发布流程调用 | 格式、类型、完整测试与构建;PR 另验收桌面安装包 |
| `.github/workflows/release-desktop.yml` | `desktop-v*` tag | 检查 → 各平台打包与验收 → Release 草稿 |
| `.github/workflows/release-cli.yml` | `cli-v*` tag | 检查 → CLI 打包与验收 → npm 发布 |
| `.github/workflows/build-desktop.yml` | 手动运行、PR 与发布流程调用 | 按平台构建并验收桌面安装包,上传 Actions 产物 |

临时测试包复用「桌面安装包构建与验收」工作流:在 **Run workflow** 中选择目标分支(如 `feat/multiplayer`),`platform` 选择 `win`、`linux`、`mac` 或 `all`,默认仅构建 Windows x64。安装包上传到对应运行的 `desktop-<平台>-<架构>` Actions 产物,保留 14 天,不创建 Release。手动入口需先随工作流合入默认分支才能使用;PR 和正式发布调用仍默认构建全部平台,签名仅由正式发布流程开启。普通分支 push 不自动打包。

正式桌面 Release 发布或编辑后,`.github/workflows/sync-website-release.yml` 仅按事件中的 Release ID 读取该版本的当前内容,创建或更新官网 `src/content/releases/<版本号>.md`,不遍历历史 Release 或官网文件树,也不自动补齐历史记录。Markdown frontmatter 保存版本、发布日期与来源链接,正文保留 Release 原文;无正文时显示未填写说明。仅当该版本高于官网 `desktopVersion` 时才更新下载版本;编辑旧版说明只更新该版本文件,不会降级下载入口。当前或更新版本缺少任一平台安装包时失败,旧版说明同步不检查安装包。版本变量与当前发布文件的变化通过 Git Trees API 在同一个 commit 中提交到 `joinTARP/web-site` 的 `main` 分支,内容相同则不提交,不修改其他版本文件或列表页 Markdown。草稿、预发布、CLI 发布不触发同步。官网托管平台需已连接该仓库,并启用 `main` 分支 push 自动构建。

Expand Down
Loading