Skill站外收录 @skilllib/skill-2014279366262337538
release
自动化管理 Python 包的版本发布流程,根据代码变更智能推荐版本升级类型,批量生成用户可见的更新日志,并支持并行处理多个包的发布准备,最终完成版本提交与标签创建,适用于多模块项目的协同发布。
软件开发 AI 技能
Skills.MD
# Release Packages
Release Plain packages with version bumping, changelog generation, and git tagging.
## Arguments
```
/release [packages...] [--minor|--patch] [--force] [--no-verify]
```
- No args: discover all packages with changes, prompt for each
- Package names: only release specified packages
- `--minor`: auto-select minor release for all packages with changes
- `--patch`: auto-select patch release for all packages with changes
- `--force`: ignore dirty git status
- `--no-verify`: skip pre-commit checks
## Workflow
### Phase 1: Check Preconditions
1. Check git status is clean (unless `--force`):
```
git status --porcelain
```
If not clean, stop and ask user to commit or stash changes.
2. Run pre-commit checks (unless `--no-verify`):
```
./scripts/pre-commit
```
### Phase 2: Discover Packages with Changes
Run the discover-changes script to find packages with unreleased changes:
```
./.claude/skills/release/discover-changes
```
This outputs JSON with each package's name, current version, and commits since last release.
If specific packages were requested, filter the results to only those packages.
### Phase 3: Collect Release Decisions
For each package with changes:
1. Display the commits since last version change
2. **Analyze commits and suggest release type**:
- **Minor**: new features, breaking changes, significant additions, new APIs
- **Patch**: small bugfixes, minor tweaks, documentation updates, refactors
3. Ask user to confirm or adjust (minor/patch/skip)
- If `--minor` or `--patch` was passed, auto-select that type
- Default to skip if user just presses Enter
### Phase 4: Bump Versions
For each package to release (using `current_version` from discover-changes output):
```
cd <path> && uv version --bump <minor|patch>
```
Display the version change (e.g., "plain-code: 0.19.0 → 0.20.0").
### Phase 5: Generate Release Notes in Parallel
**IMPORTANT**: Use the Task tool to spawn one agent per package for parallel release notes generation.
For each package to release, spawn a Task agent with this prompt (using values from the discover-changes output):
```
Generate release notes for <name> version <new_version>.
1. Get the actual file changes since the last release:
git diff <last_tag>..HEAD -- <name> ":(exclude)<name>/tests"
2. Read the diff output carefully to understand what actually changed.
3. Write release notes to <changelog_path>, prepending to the existing content.
Format:
## [<new_version>](https://github.com/dropseed/plain/releases/<name>@<new_version>) (<today's date>)
### What's changed
- Summarize user-facing changes based on the actual diff (not just commit messages)
- Include commit hash links: ([abc1234](https://github.com/dropseed/plain/commit/abc1234))
- Skip test changes, internal refactors that don't affect public API
### Upgrade instructions
- Specific steps if any API changed
- If no changes required: "- No changes required."
```
Wait for all agents to complete.
### Phase 6: Format and Sync
Run once after all changes:
```
uv sync
./scripts/fix
```
### Phase 7: Commit Each Package
For each package to release:
1. Show the diff of pyproject.toml and CHANGELOG.md:
```
git diff --color=always <package>/pyproject.toml <package>/**/CHANGELOG.md
```
2. Ask user to confirm commit
3. If confirmed:
```
git add <package>/pyproject.toml <package>/**/CHANGELOG.md uv.lock
git commit -m "Release <package> <version>" -n
git tag -a "<package>@<version>" -m "Release <package> <version>"
```
### Phase 8: Push
Ask user if they want to push all changes:
```
git push --follow-tags
```
## Release Type Guidelines
Since all packages are pre-1.0, use:
- **Minor (0.x.0)**: New features, breaking changes, new APIs, significant additions
- **Patch (0.0.x)**: Bugfixes, minor tweaks, documentation, refactors
Analyze commit messages for keywords:
- Minor indicators: "add", "new", "feature", "breaking", "remove", "rename API"
- Patch indicators: "fix", "bugfix", "typo", "docs", "refactor", "update"
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「release」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次