From f12165130ec645bdbfc7b86b79aad8dfe82d4d10 Mon Sep 17 00:00:00 2001 From: zy Date: Wed, 17 Sep 2025 01:49:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=9A=84=E5=A4=9A=E5=B9=B3=E5=8F=B0=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GitHub Actions 现在也会构建登录工具的二进制文件 - 支持 4 个平台:macOS ARM64/Intel, Windows x64, Linux x64 - 更新 Release 说明,包含登录工具下载链接 - 更新 README 文档,提供完整的二进制使用流程 - 用户现在可以完全无需 Go 环境使用项目 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/release.yml | 59 ++++++++++++++++++++++++++++++++++- README.md | 22 ++++++++----- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99f9afa..f8513b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,17 +34,22 @@ jobs: - name: Build for multiple platforms run: | + # 主程序构建 # macOS ARM64 (Apple Silicon) GOOS=darwin GOARCH=arm64 go build -o xiaohongshu-mcp-darwin-arm64 . + GOOS=darwin GOARCH=arm64 go build -o xiaohongshu-login-darwin-arm64 ./cmd/login # macOS Intel GOOS=darwin GOARCH=amd64 go build -o xiaohongshu-mcp-darwin-amd64 . + GOOS=darwin GOARCH=amd64 go build -o xiaohongshu-login-darwin-amd64 ./cmd/login # Windows x64 GOOS=windows GOARCH=amd64 go build -o xiaohongshu-mcp-windows-amd64.exe . + GOOS=windows GOARCH=amd64 go build -o xiaohongshu-login-windows-amd64.exe ./cmd/login # Linux x64 GOOS=linux GOARCH=amd64 go build -o xiaohongshu-mcp-linux-amd64 . + GOOS=linux GOARCH=amd64 go build -o xiaohongshu-login-linux-amd64 ./cmd/login - name: Create Release id: create_release @@ -64,14 +69,25 @@ jobs: - 后续运行无需重复下载浏览器 **下载说明:** + + **主程序(MCP 服务):** - **macOS Apple Silicon**: `xiaohongshu-mcp-darwin-arm64` - **macOS Intel**: `xiaohongshu-mcp-darwin-amd64` - **Windows x64**: `xiaohongshu-mcp-windows-amd64.exe` - **Linux x64**: `xiaohongshu-mcp-linux-amd64` + **登录工具:** + - **macOS Apple Silicon**: `xiaohongshu-login-darwin-arm64` + - **macOS Intel**: `xiaohongshu-login-darwin-amd64` + - **Windows x64**: `xiaohongshu-login-windows-amd64.exe` + - **Linux x64**: `xiaohongshu-login-linux-amd64` + **使用方法:** ```bash - # 下载对应平台的文件后,直接运行 + # 1. 首先运行登录工具 + ./xiaohongshu-login-darwin-arm64 + + # 2. 然后启动 MCP 服务 ./xiaohongshu-mcp-darwin-arm64 # 或指定参数 @@ -120,4 +136,45 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./xiaohongshu-mcp-linux-amd64 asset_name: xiaohongshu-mcp-linux-amd64 + asset_content_type: application/octet-stream + + # 登录工具上传 + - name: Upload Login Tool - macOS ARM64 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./xiaohongshu-login-darwin-arm64 + asset_name: xiaohongshu-login-darwin-arm64 + asset_content_type: application/octet-stream + + - name: Upload Login Tool - macOS Intel + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./xiaohongshu-login-darwin-amd64 + asset_name: xiaohongshu-login-darwin-amd64 + asset_content_type: application/octet-stream + + - name: Upload Login Tool - Windows x64 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./xiaohongshu-login-windows-amd64.exe + asset_name: xiaohongshu-login-windows-amd64.exe + asset_content_type: application/octet-stream + + - name: Upload Login Tool - Linux x64 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./xiaohongshu-login-linux-amd64 + asset_name: xiaohongshu-login-linux-amd64 asset_content_type: application/octet-stream \ No newline at end of file diff --git a/README.md b/README.md index 61e9e15..a3593a4 100644 --- a/README.md +++ b/README.md @@ -144,19 +144,27 @@ https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80 直接从 [GitHub Releases](https://github.com/xpzouying/xiaohongshu-mcp/releases) 下载对应平台的二进制文件: +**主程序(MCP 服务):** - **macOS Apple Silicon**: `xiaohongshu-mcp-darwin-arm64` - **macOS Intel**: `xiaohongshu-mcp-darwin-amd64` - **Windows x64**: `xiaohongshu-mcp-windows-amd64.exe` - **Linux x64**: `xiaohongshu-mcp-linux-amd64` -下载后直接运行: +**登录工具:** +- **macOS Apple Silicon**: `xiaohongshu-login-darwin-arm64` +- **macOS Intel**: `xiaohongshu-login-darwin-amd64` +- **Windows x64**: `xiaohongshu-login-windows-amd64.exe` +- **Linux x64**: `xiaohongshu-login-linux-amd64` + +使用步骤: ```bash -# macOS/Linux +# 1. 首先运行登录工具 +chmod +x xiaohongshu-login-darwin-arm64 +./xiaohongshu-login-darwin-arm64 + +# 2. 然后启动 MCP 服务 chmod +x xiaohongshu-mcp-darwin-arm64 ./xiaohongshu-mcp-darwin-arm64 - -# Windows -xiaohongshu-mcp-windows-amd64.exe ``` **⚠️ 重要提示**:首次运行时会自动下载无头浏览器(约 150MB),请确保网络连接正常。后续运行无需重复下载。 @@ -193,8 +201,8 @@ Windows 遇到问题首先看这里:[Windows 安装指南](./docs/windows_guid **使用二进制文件**: ```bash -# 下载 login 工具或使用源码编译 -go run cmd/login/main.go +# 运行对应平台的登录工具 +./xiaohongshu-login-darwin-arm64 ``` **使用源码**: