Skip to content

feat: add Intel macOS (x64) CI/CD support via GitHub Actions#10

Open
996superbot wants to merge 1 commit into
huohuoer:mainfrom
996superbot:feat/intel-macos-support
Open

feat: add Intel macOS (x64) CI/CD support via GitHub Actions#10
996superbot wants to merge 1 commit into
huohuoer:mainfrom
996superbot:feat/intel-macos-support

Conversation

@996superbot
Copy link
Copy Markdown

Summary

This PR adds GitHub Actions CI/CD to build and release wechat-cli binaries for all platforms, with a focus on enabling Intel macOS (x64) support which is currently missing.

Problem

  • The npm package only ships a darwin-arm64 binary
  • darwin-x64 platform directory exists but has no compiled binary
  • No CI/CD pipeline exists to build platform-specific binaries
  • Intel Mac users cannot use npm install -g @canghe_ai/wechat-cli

Changes

1. .github/workflows/release.yml (new)

Multi-platform GitHub Actions workflow with 6 jobs:

  • macOS x64 — builds on macos-13 (Intel runner), compiles C key scanner for x86_64, PyInstaller packaging
  • macOS arm64 — builds on macos-14 (Apple Silicon runner)
  • Linux x64 / arm64 — builds on ubuntu-latest
  • Windows x64 — builds on windows-latest
  • Release — auto-creates a draft GitHub Release with all platform binaries attached

Triggered by v* tags or manual workflow_dispatch.

2. npm/wechat-cli/package.json (modified)

Added all platform packages to optionalDependencies:

  • @canghe_ai/wechat-cli-darwin-x64
  • @canghe_ai/wechat-cli-linux-x64
  • @canghe_ai/wechat-cli-linux-arm64
  • @canghe_ai/wechat-cli-win32-x64

This ensures npm install automatically fetches the correct binary for the user's platform.

Verification

The Intel macOS C binary (find_all_keys_macos.x86_64) has been compiled and tested locally on an Intel MacBook Pro (x86_64, macOS 14.8.3) — wechat-cli --help runs successfully.

Next Steps

After merging, the maintainer can:

  1. Create a v0.2.5 (or next version) tag to trigger the workflow
  2. Publish platform packages to npm (@canghe_ai/wechat-cli-darwin-x64, etc.)
  3. The release will include pre-built binaries for all platforms

- Add .github/workflows/release.yml with multi-platform build jobs
  - macOS x64 (macos-13 Intel runner): compile C binary + PyInstaller
  - macOS arm64 (macos-14 Apple Silicon runner)
  - Linux x64/arm64, Windows x64
  - Auto-create GitHub Release with all platform binaries
- Add darwin-x64, linux-x64, linux-arm64, win32-x64 to optionalDependencies
  so npm install works on all platforms
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