gh-oss-release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOSS Release
OSS 发布
Batch release workflow for multiple OSS repositories using .
gh oss-watch releases使用在多个OSS仓库中批量执行发布的工作流。
gh oss-watch releasesWorkflow
工作流
Step 1: Check Release Status
步骤1:检查发布状态
Run to identify repos with unreleased commits.
gh oss-watch releasesIf all repos are up to date, report that and stop.
运行识别存在未发布提交的仓库。
gh oss-watch releases如果所有仓库均为最新状态,将进行报告并终止流程。
Step 2: Analyze Unreleased Commits
步骤2:分析未发布提交
For each repo needing a release, fetch commit messages since the last tag in parallel:
bash
gh api repos/<owner>/<repo>/compare/<last-tag>...HEAD --jq '[.commits[] | .commit.message | split("\n")[0]] | .[]'为每个需要发布的仓库,并行获取从上一个标签到HEAD的提交信息:
bash
gh api repos/<owner>/<repo>/compare/<last-tag>...HEAD --jq '[.commits[] | .commit.message | split("\n")[0]] | .[]'Step 3: Recommend Semver Bump
步骤3:推荐SemVer版本升级
Classify each commit's first line and recommend the highest applicable bump:
| Commit pattern | Bump |
|---|---|
| patch |
| minor |
| major |
If ALL commits are deps/ci/chore, recommend patch. If any commit adds a feature, recommend minor. If any commit has breaking changes, recommend major.
分类每个提交的第一行内容,推荐优先级最高的版本升级类型:
| 提交模式 | 升级类型 |
|---|---|
| patch |
| minor |
| major |
如果所有提交均为依赖/CI/杂项变更,推荐patch。如果存在任何新增功能的提交,推荐minor。如果存在任何包含破坏性变更的提交,推荐major。
Step 4: Present Recommendations
步骤4:展示推荐内容
Present a table for user confirmation:
| Repo | Current | Recommended | Commits | Rationale |
|------|---------|-------------|---------|-----------|
| repo-name | v1.2.3 | v1.2.4 | 5 | All dependency bumps |Use AskUserQuestion or wait for explicit user confirmation before proceeding.
为用户展示表格以确认:
| 仓库 | 当前版本 | 推荐版本 | 提交数量 | 理由 |
|------|---------|-------------|---------|-----------|
| repo-name | v1.2.3 | v1.2.4 | 5 | 所有变更均为依赖升级 |在继续前,使用AskUserQuestion或等待用户明确确认。
Step 5: Create Releases
步骤5:创建Releases
After confirmation, create releases in parallel:
bash
gh release create <new-tag> --repo <owner>/<repo> --generate-notes获得确认后,并行创建Releases:
bash
gh release create <new-tag> --repo <owner>/<repo> --generate-notesStep 6: Verify
步骤6:验证
Run again to confirm all repos show "up to date".
gh oss-watch releases再次运行,确认所有仓库显示“up to date”。
gh oss-watch releasesStep 7: Update Homebrew Tap
步骤7:更新Homebrew Tap
After all releases are verified, update the homebrew-tap formulae:
bash
cd ~/ghq/github.com/jackchuka/homebrew-tap
git pull origin main
make updateThen commit with a message listing the updated versions (e.g., ) and push:
update: gql-ingest v3.1.6, slackcli v0.3.0bash
git add -A
git commit -m "<version summary>"
git push origin main所有发布验证完成后,更新homebrew-tap公式:
bash
cd ~/ghq/github.com/jackchuka/homebrew-tap
git pull origin main
make update随后提交包含更新版本列表的信息(例如:)并推送:
update: gql-ingest v3.1.6, slackcli v0.3.0bash
git add -A
git commit -m "<version summary>"
git push origin mainImportant Notes
重要说明
- Tag-triggered CI: Most repos have CI that triggers on tag push (goreleaser, gh-extension-precompile, npm publish). The command creates the tag which triggers the CI build.
gh release create - npm packages with tag-triggered workflows: These repos derive version from the git tag during CI — no package.json bump needed.
- Parallel execution: Fetch commits and create releases in parallel across repos for speed.
- Never force: Always confirm with user before creating any releases.
- 标签触发的CI:大多数仓库都配置了在标签推送时触发的CI(goreleaser、gh-extension-precompile、npm publish)。命令会创建标签,进而触发CI构建。
gh release create - 带有标签触发工作流的npm包:这些仓库在CI流程中从git标签获取版本号——无需修改package.json。
- 并行执行:为提升效率,在多个仓库间并行获取提交信息和创建Releases。
- 绝不强制操作:在创建任何Releases前必须获得用户明确确认。