Skip to content

Commit 9ba7dd8

Browse files
committed
ci(macos): GitHub Actions universal .pkg 构建与发布
- release.yml 重构为 build-windows / build-macos / release 三 job 并行, macOS 产 universal(arm64+x86_64) .pkg 并入同一草稿 Release; release notes 生成由 PowerShell 改写为 bash(逻辑等价) - ci.yml 加 changes 门控 + macos-check(仅 wind_macos/**、wind_input/** 改动触发) - build.sh/app.sh/setting.sh/pkg.sh 支持 WIND_MAC_UNIVERSAL / --universal: Go lipo 合并、swift --arch 双架构、wails darwin/universal、hostArchitectures - app.sh 从 VERSION 文件注入 CFBundleShortVersionString(版本随 tag 贯通) - pkg.sh 产物改名 -macOS 后缀, 预留 Developer ID 签名 + notarytool 公证接口 - CI 工具链对齐 dev: pnpm 11.3.0 + Node 22 (pnpm 11 需 Node>=22.13; pnpm 9 不识别 pnpm-workspace.yaml 的 allowBuilds 键) - setting.sh 在 wails generate 前建 stub frontend/dist, 修全新检出下 //go:embed all:frontend/dist 报 no matching files found - release job 用通配符收集资产, 不依赖精确版本文件名
1 parent 3f02f84 commit 9ba7dd8

7 files changed

Lines changed: 405 additions & 152 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,41 @@ jobs:
5252
- name: Vet wind_setting
5353
working-directory: wind_setting
5454
run: go vet ./...
55+
56+
# 门控: 仅当 macOS 相关路径改动时才触发昂贵的 macos-14 编译校验 (runner 计费约 10x).
57+
# GitHub 不支持 per-job paths, 故用一个 ubuntu 廉价 job 输出是否命中, macos-check 据此 if 短路.
58+
changes:
59+
name: Detect macOS-related changes
60+
runs-on: ubuntu-latest
61+
outputs:
62+
macos: ${{ steps.filter.outputs.macos }}
63+
steps:
64+
- uses: actions/checkout@v4
65+
- uses: dorny/paths-filter@v3
66+
id: filter
67+
with:
68+
filters: |
69+
macos:
70+
- 'wind_macos/**'
71+
- 'wind_input/**'
72+
73+
# 轻量 macOS 编译校验: 只 swift build + go build, 不打包、不跑 Wails 全量.
74+
macos-check:
75+
name: macOS Build Check
76+
needs: changes
77+
if: needs.changes.outputs.macos == 'true'
78+
runs-on: macos-14
79+
steps:
80+
- uses: actions/checkout@v4
81+
82+
- uses: actions/setup-go@v5
83+
with:
84+
go-version-file: wind_input/go.mod
85+
86+
- name: Build wind-input-app (Swift IME)
87+
working-directory: wind_macos
88+
run: swift build --product wind-input-app
89+
90+
- name: Build wind_input (Go service, darwin)
91+
working-directory: wind_input
92+
run: go build ./...

0 commit comments

Comments
 (0)