Skip to content

Commit c9e8f37

Browse files
author
OpenCode CLI User
committed
ci: enhance GitHub Actions workflow with multi-platform release builds
- Add Windows, macOS, Linux multi-platform build matrix - Configure release job to upload binaries with checksums - Use softprops/action-gh-release@v2 for release assets - Build artifacts include .exe for Windows platforms - Upload SHA256 checksums for each binary
1 parent 7f2865b commit c9e8f37

File tree

2 files changed

+114
-29
lines changed

2 files changed

+114
-29
lines changed

.github/workflows/go.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
needs: [lint, test]
8585
strategy:
8686
matrix:
87-
goos: [linux]
87+
goos: [linux, windows, darwin]
8888
goarch: [amd64, arm64]
8989
steps:
9090
- name: Checkout code
@@ -105,13 +105,13 @@ jobs:
105105
GOOS: ${{ matrix.goos }}
106106
GOARCH: ${{ matrix.goarch }}
107107
run: |
108-
go build -ldflags="-s -w" -o bin/${APP_NAME}-${GOOS}-${GOARCH} ./cmd
108+
go build -ldflags="-s -w" -o bin/${APP_NAME}-${GOOS}-${GOARCH}${{ matrix.goos == 'windows' && '.exe' || '' }} ./cmd
109109
110110
- name: Upload artifact
111111
uses: actions/upload-artifact@v4
112112
with:
113113
name: ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}
114-
path: oho/bin/${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}
114+
path: oho/bin/${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }}
115115
retention-days: 7
116116

117117
# ===========================================
@@ -170,38 +170,22 @@ jobs:
170170
GOOS: ${{ matrix.goos }}
171171
GOARCH: ${{ matrix.goarch }}
172172
run: |
173+
mkdir -p dist
173174
OUTPUT_NAME="${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}"
174-
go build -ldflags="-s -w -X main.Version=${GITHUB_REF#refs/tags/}" -o "${OUTPUT_NAME}" ./cmd
175-
ls -la
176-
177-
- name: Upload Release Asset
178-
uses: softprops/action-gh-release@v1
179-
with:
180-
tag_name: ${{ github.ref }}
181-
name: ${{ env.APP_NAME }} ${{ github.ref }}
182-
body: |
183-
## Release Notes
184-
185-
### Changes
186-
- Automated build for ${{ matrix.goos }}/${{ matrix.goarch }}
187-
188-
### Downloads
189-
- ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}
190-
files: |
191-
oho/${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}
192-
env:
193-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175+
go build -ldflags="-s -w -X main.Version=${GITHUB_REF#refs/tags/}" -o "dist/${OUTPUT_NAME}" ./cmd
194176
195177
- name: Create checksums
196-
working-directory: oho
178+
working-directory: oho/dist
197179
run: |
198-
${{ matrix.goos == 'windows' && 'certutil -hashfile' || 'sha256sum' }} ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} | tee checksums.txt
180+
${{ matrix.goos == 'windows' && 'certutil -hashfile' || 'sha256sum' }} ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} > ${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}.sha256
199181
200-
- name: Upload Checksums
201-
uses: softprops/action-gh-release@v1
182+
- name: Upload Release Asset
183+
uses: softprops/action-gh-release@v2
202184
with:
203-
tag_name: ${{ github.ref }}
204-
body_path: oho/checksums.txt
185+
tag_name: ${{ github.ref_name }}
186+
files: |
187+
oho/dist/${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}
188+
oho/dist/${{ env.APP_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}.sha256
205189
env:
206190
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
207191

docs/2026-02-28.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# opencode_cli 开发日报
2+
3+
**日期**: 2026-02-28
4+
**生成时间**: 2026-03-01 08:19 CST
5+
6+
---
7+
8+
## 📊 今日提交概览
9+
10+
**提交数量**: 20+ commits
11+
**主要分支**: master
12+
**状态**: ✅ 已推送远程
13+
14+
---
15+
16+
## 🎯 主要功能开发
17+
18+
### 1. MCP 服务器支持
19+
- **提交**: `fad165a feat: add MCP server and one-click install script`
20+
- **内容**: 添加 MCP 服务器模式和一键安装脚本
21+
- **影响**: 支持外部 MCP 客户端调用 OpenCode API
22+
23+
### 2. 配置加载优化
24+
- **提交**: `52ff537 fix: correct config loading priority order`
25+
- **提交**: `21307fa fix: ensure OPENCODE_SERVER_PASSWORD env var is properly loaded`
26+
- **内容**: 修复配置加载优先级和环境变量加载问题
27+
- **影响**: 提高配置可靠性和安全性
28+
29+
### 3. 错误处理增强
30+
- **提交**: `e9a82e2 feat: improve 401 error message with helpful configuration guide`
31+
- **内容**: 改进 401 错误消息,添加配置指南
32+
- **影响**: 提升用户体验和调试效率
33+
34+
### 4. URL 和 JSON 解析修复
35+
- **提交**: `02eedba fix: multiple bug fixes for URL, JSON parsing, and API parameters`
36+
- **内容**: 修复 URL 处理、JSON 解析和 API 参数问题
37+
- **影响**: 提高稳定性和兼容性
38+
39+
### 5. 文档完善
40+
- **提交**: `1bce272 docs: add API completion status documentation`
41+
- **提交**: `1ef12b9 docs: 添加 README 语言切换链接`
42+
- **内容**: 添加 API 完成状态文档和 README 语言切换
43+
- **影响**: 改善文档完整性和国际化
44+
45+
---
46+
47+
## 🔧 代码质量改进
48+
49+
### golangci-lint 修复
50+
- **提交**: `78e8354 fix: resolve remaining golangci-lint errors`
51+
- **提交**: `e892d5d fix: resolve golangci-lint errors (errcheck and unused variables)`
52+
- **内容**: 修复 golangci-lint 报告的所有错误
53+
- **影响**: 提升代码质量和可维护性
54+
55+
### 测试清理
56+
- **提交**: `e301888 test: clean up duplicate test code and fix assertions`
57+
- **内容**: 清理重复测试代码,修复断言
58+
- **影响**: 提高测试可靠性和可维护性
59+
60+
### CI/CD 修复
61+
- **提交**: `97adae6 ci: fix GitHub Actions workflow configuration`
62+
- **内容**: 修复 GitHub Actions 工作流配置
63+
- **影响**: 确保 CI/CD 正常运行
64+
65+
---
66+
67+
## 📝 其他修复
68+
69+
- **提交**: `8ce49cb fix: correct shell syntax in install.sh` - 修复安装脚本语法
70+
- **提交**: `6ed7f1f Merge pull request #2` - 合并功能分支
71+
- **提交**: `b97b154 Merge pull request #5` - 合并 MCP 服务器功能
72+
- **提交**: `646d348 Merge pull request #6` - 合并配置修复
73+
- **提交**: `b00500e Merge pull request #7` - 合并多项修复
74+
75+
---
76+
77+
## 📈 项目进展
78+
79+
| 模块 | 状态 | 备注 |
80+
|------|------|------|
81+
| **核心 CLI** | ✅ 稳定 | 基础功能完善 |
82+
| **MCP 服务器** | ✅ 新增 | 支持外部客户端 |
83+
| **配置管理** | ✅ 优化 | 优先级和加载修复 |
84+
| **错误处理** | ✅ 增强 | 401 错误消息改进 |
85+
| **文档** | ✅ 完善 | API 状态和国际化 |
86+
| **代码质量** | ✅ 提升 | golangci-lint 全通过 |
87+
| **测试** | ✅ 清理 | 重复代码移除 |
88+
| **CI/CD** | ✅ 修复 | GitHub Actions 正常 |
89+
90+
---
91+
92+
## 🚀 下一步计划
93+
94+
1. **性能优化**: 分析瓶颈,优化执行速度
95+
2. **功能扩展**: 添加更多 oho CLI 命令支持
96+
3. **测试覆盖**: 增加单元测试和集成测试
97+
4. **文档完善**: 补充使用示例和最佳实践
98+
99+
---
100+
101+
*本日报由 nanobot 自动生成,基于 Git 提交记录分析*

0 commit comments

Comments
 (0)