Skip to content

Fix the workflow paths' errors.#37

Merged
TheNorthStarYang merged 11 commits into
AhakeyAI:mainfrom
ZephyrKeXiner:fix/release-workflow-paths
Jun 22, 2026
Merged

Fix the workflow paths' errors.#37
TheNorthStarYang merged 11 commits into
AhakeyAI:mainfrom
ZephyrKeXiner:fix/release-workflow-paths

Conversation

@ZephyrKeXiner

@ZephyrKeXiner ZephyrKeXiner commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

1. 背景

platforms/macos 重命名为 ahakeyconfig-mac 后,release.yml 没跟着改,打 v*
tag 会构建失败 —— 实际上发不出任何 Release。同时 app 版本号写死 0.1.0
每个 Release 版本号都一样,用户无法判断是否已更新。

2. 改动

.github/workflows/release.yml

  • working-directory 与产物上传路径 platforms/macos/clientahakeyconfig-mac
  • 固定 DMG_BASENAME=AhaKey-Studio-macOS(否则 package_dmg.sh 默认带时间戳,
    action-gh-release 找不到文件)
  • 先从 tag 解析版本,再以 APP_VERSION 注入构建

ahakeyconfig-mac/scripts/build.sh

  • CFBundleShortVersionString 改为读 APP_VERSION(缺省 0.1.0)→ tag vX.Y.Z
    写进 app
  • BUILD_NUMBER 的 git 路径($APP_ROOT/../.. 重命名后指到仓库外,build 号恒为 1)
    $APP_ROOT

3. 修改类型

请选择本次 PR 的类型。
Please select the type of this PR.

  • Bug fix / Bug 修复
  • Documentation / 文档修改
  • New feature / 新功能
  • Refactor / 重构
  • Build or packaging / 构建或打包
  • Protocol example / 协议示例
  • Community project or showcase / 社区项目或展示
  • Other / 其他

4. Area / 涉及范围

请选择本次修改涉及的部分。
Please select the area affected by this PR.

  • desktop
  • protocol
  • awesome-ahakey
  • firmware
  • docs
  • macOS
  • Windows
  • Other / 其他

5. 测试

  • 本地 APP_VERSION=1.2.3 scripts/build.sh → 产物 CFBundleShortVersionString=1.2.3
    CFBundleVersion=68(提交数)
  • release.yml YAML 校验通过

6. 备注

  • 这是后续能正常发版的前提。
  • Release 仍是 ad-hoc 签名(非公证),用户下载需右键打开 —— 建议写进 Release notes。

ZephyrKeXiner and others added 11 commits June 2, 2026 14:49
JSON-RPC 2.0 over stdio 插件骨架,rebased 到 upstream/main 新结构:

* AhaKeyPluginKit (library)
  - JSONRPC.swift       协议类型 (JSONValue / Request / Response / Error)
  - PluginClient.swift  actor 客户端 (readabilityHandler 事件驱动 stdin/stdout)
  - PluginHost.swift    host/* 方法 + 权限白名单
  - PluginLifecycle.swift initialize / initialized / shutdown / exit
  - PluginManifest.swift plugin.json + ${pluginDir} 占位符
  - PluginManager.swift  扫描目录、批量加载、错误隔离

* Plugin (executable demo)
  - `swift run Plugin` 跑一遍 PluginManager 流程
  - 用 AHAKEY_PLUGINS_DIR 指定插件目录

* AhaKeyConfig 主 app
  - dependencies 加 AhaKeyPluginKit (可直接 import)
  - exclude AhaKeyPlugin / AhaKeyPluginKit 避免被当成主 app sources

兼容 macOS 12:URL(filePath:) 全部改回 URL(fileURLWithPath:)
A small background plugin that polls the physical switch state once a
second, counts auto/manual flips, tracks per-mode dwell time, and exposes
demo/flowStats. Falls back to ~/.ahakey-fake-lever when no agent/keyboard
is reachable, so it can be demoed without hardware. Wired into the SDK
build / typecheck / clean scripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ci.yml runs on push/PR: TypeScript SDK typecheck + tests, compile-check
all Swift targets, then package the macOS app and upload it as an artifact.
package_app.sh assembles AhaKeyConfig into an ad-hoc signed
"AhaKey Studio.app", shared by local builds and CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Examples resolve @ahakey/plugin-sdk via package self-reference to
dist/index.d.ts, but dist/ is gitignored and absent on a clean CI
checkout, so `npm run typecheck` failed with "Cannot find module
'@ahakey/plugin-sdk'". Make typecheck self-contained by running
build:sdk first, the same way the test script already builds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…stream layout

Upstream/main 把多平台目录从 platforms/<os>/ 拍扁成 ahakeyconfig-<os>/。
这一 commit 只做目录重命名,路径里引用 platforms/macos 的脚本/CI/docs
留到下一个 commit 处理。
Update platforms/macos -> ahakeyconfig-mac in path references that
belonged to feat/plugin's own commits (TS SDK npm scripts, CI
workflow working-directory, package_app.sh comments). README/CHANGELOG/
docs path references are left for the upcoming merge with upstream/main
to overwrite, since upstream already rewrote them.
Upstream/main 新增内容:
- bf49f5a: 灯效自定义 + 4 Mode + 权限延迟 + 编辑态优化 (AhakeyAI#33)
- README/CHANGELOG/docs 全部重写以反映多平台目录布局 (AhakeyAI#35)
- LICENSE 改为 placeholder(待与上游统一)

冲突解决:
- ahakeyconfig-mac/Sources/Agent/AhaKeyAgent.swift:人手 3-way merge
  保留 HEAD 的 hasLiveSocket() 检测 + Bool 返回值 (避免双 agent)
  并入 upstream 的 startWatchdog() 调用
- 6 个文件 (HookClient/AhaKeyConfigApp/AhaKeyStudioView/ContentView/
  generate_dmg_background.swift/generate_icons.swift):feat/plugin
  本身没改过内容,直接接受 upstream 版本
- Makefile + VibeCodeKeyboard.ico:跟随 upstream 搬到 repo root
- cursor_0.gif + build.local.env*:接受上游删除
release.yml still referenced platforms/macos/client, which was renamed
to ahakeyconfig-mac (feb5201/63f548f). ci.yml was updated but release.yml
was missed, so any v* tag would fail the release job.

- working-directory: platforms/macos/client -> ahakeyconfig-mac
- upload path: platforms/macos/client/dist -> ahakeyconfig-mac/dist
- pin DMG_BASENAME=AhaKey-Studio-macOS so the artifact filename matches
  the upload path (package_dmg.sh otherwise appends a timestamp)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ilds apart

build.sh hard-coded CFBundleShortVersionString to 0.1.0, and release.yml only
used the tag version for the GitHub Release title — so every published DMG
reported 0.1.0 and users couldn't tell whether they'd installed a fix.

- build.sh: read APP_VERSION (default 0.1.0) into CFBundleShortVersionString.
- release.yml: resolve version from the tag before building and pass it as
  APP_VERSION, so tag vX.Y.Z -> app version X.Y.Z.
- build.sh: fix BUILD_NUMBER git path ($APP_ROOT/../.. pointed above the repo
  after the dir rename, so CFBundleVersion was stuck at 1); use $APP_ROOT.

Verified locally: APP_VERSION=1.2.3 -> CFBundleShortVersionString 1.2.3,
CFBundleVersion 68 (commit count).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ZephyrKeXiner ZephyrKeXiner self-assigned this Jun 22, 2026
@ZephyrKeXiner ZephyrKeXiner changed the title Add AhaKeyPluginKit and demo executable with CI improvements Fix the workflow paths' errors. Jun 22, 2026
@TheNorthStarYang TheNorthStarYang merged commit c518f9f into AhakeyAI:main Jun 22, 2026
2 checks passed
@ZephyrKeXiner ZephyrKeXiner deleted the fix/release-workflow-paths branch June 22, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants