You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .opencode/command/release.md
+42-28Lines changed: 42 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,31 @@ agent: ci-agent
6
6
# Release Command
7
7
8
8
## Overview
9
-
The Release Command automates the preparation and execution of software releases, including quality checks, versioning, and deployment.
9
+
The Release Command automates the preparation and execution of software releases, incorporating best practices for GitHub releases, including branch synchronization, complete changelog inclusion, conventional commits for changelog generation, semantic versioning, protected branches, and automated release notes.
10
10
11
11
## Purpose
12
-
To ensure releases are built, tested, and deployed reliably, coordinating multiple agents for a seamless process.
12
+
To ensure releases are built, tested, and deployed reliably, coordinating multiple agents for a seamless process while addressing issues like develop branch not being up to date and incomplete changelogs in releases.
13
13
14
14
## Inputs/Outputs
15
-
-**Inputs**: Optional arguments like "alpha" for pre-releases.
16
-
-**Outputs**: Release confirmation, version updates, or error reports.
15
+
-**Inputs**: Optional arguments like "alpha" for pre-releases, "patch" for patch releases, "dry-run" for dry runs.
16
+
-**Outputs**: Release confirmation, version updates, changelog updates, or error reports.
17
17
18
18
## Dependencies
19
19
- Cargo toolchain.
20
20
- Agents: CI Agent, Storage Agent, Docs Agent, Git Handler, GitHub, Hive Mind Orchestrator.
21
+
- Tools: git-cliff for changelog generation from conventional commits.
21
22
22
23
## Usage Examples
23
24
- Standard release: `/release`
24
25
- Pre-release: `/release alpha`
25
26
- Patch release: `/release patch`
27
+
- Dry-run: `/release dry-run`
26
28
27
29
## Changelog
28
30
- v1.0: Basic release with checks.
29
31
- v1.1: Added agent coordination.
32
+
- v1.2: Incorporated best practices for branch sync, changelog, and automated releases.
33
+
- v1.3: Added support for dry-run argument to run quality checks and report without proceeding to release.
30
34
31
35
## Error Scenarios
32
36
-**Build Failures**: Stop and report errors; suggest fixes before retrying.
@@ -36,49 +40,59 @@ To ensure releases are built, tested, and deployed reliably, coordinating multip
36
40
-**Version Conflicts**: If version bump fails, check existing tags.
37
41
-**Agent Handoff Failures**: If an agent fails (e.g., CI pipeline), retry or escalate.
38
42
-**Network/Permission Issues**: For pushing tags, ensure auth and connectivity.
43
+
-**Branch Sync Issues**: If develop is not up to date, merge main to develop before proceeding.
44
+
-**Changelog Incomplete**: Ensure all commits follow conventional commit format for accurate changelog generation.
39
45
40
46
## Integration Notes
41
-
-**Handoff Protocols**: Sequential handoffs: checks -> version bump -> CI -> storage update -> docs -> git -> github (PR creation and merge). Confirm each step before proceeding.
47
+
-**Handoff Protocols**: Sequential handoffs: branch sync check -> checks -> version bump -> CI -> storage update -> docs -> git -> github (PR creation and merge). Confirm each step before proceeding.
42
48
-**Collaboration**: Uses CI Agent for pipelines, Storage for versions, Docs for updates, Git for commits/tags, GitHub for PR creation and merging. For complex releases, hand off to Hive Mind Orchestrator.
43
-
-**Best Practices**: Always run checks first; log all actions. Confirm completion with user.
44
-
-**Edge Cases**: Handle pre-releases differently; for hotfixes, skip some checks if urgent (with caution).
49
+
-**Best Practices**: Always run checks first; use semantic versioning; ensure protected branches (main protected); log all actions. Confirm completion with user. Use conventional commits for automated changelog.
50
+
-**Edge Cases**: Handle pre-releases differently; for hotfixes, skip some checks if urgent (with caution). Address develop branch not up to date by merging main to develop.
45
51
46
-
Prepare for release. Optional: $ARGUMENTS (e.g., "alpha" for pre-release)
52
+
Prepare for release. Optional: $ARGUMENTS (e.g., "alpha" for pre-release, "patch" for patch release, "dry-run" for dry run)
47
53
48
-
First, run quality checks. Stop on any errors or warnings.
54
+
First, ensure branch synchronization:
55
+
- Check if develop branch is up to date with main. If not, merge main into develop to sync changes.
56
+
- Switch to develop branch if not already on it.
57
+
58
+
Then, run quality checks. Stop on any errors or warnings.
49
59
50
60
Build check: !`cargo build`
51
-
If build fails, stop and report errors.
61
+
If build fails, report errors. If not dry-run, stop.
52
62
53
63
Test check: !`cargo test`
54
-
If tests fail, stop and report failures.
64
+
If tests fail, report failures. If not dry-run, stop.
55
65
56
66
Lint check: !`cargo clippy`
57
-
If clippy finds issues, stop and report warnings/errors.
67
+
If clippy finds issues, report warnings/errors. If not dry-run, stop.
58
68
59
69
Format check: !`cargo fmt --check`
60
-
If formatting issues, stop and report.
70
+
If formatting issues, report. If not dry-run, stop.
61
71
62
72
Doc tests: !`cargo test --doc`
63
-
If doc tests fail, stop and report failures.
73
+
If doc tests fail, report failures. If not dry-run, stop.
If coverage generation fails, stop and report errors.
76
+
If coverage generation fails, report errors. If not dry-run, stop.
67
77
68
78
Security audit: !`cargo audit`
69
-
If security vulnerabilities are found, stop and report.
79
+
If security vulnerabilities are found, report. If not dry-run, stop.
80
+
81
+
If "dry-run" is specified, report the summary of all check results and stop.
70
82
71
-
If all checks pass:
72
-
1. Determine new version: /version-bump $ARGUMENTS
83
+
Else if all checks pass:
84
+
1. Determine new version using semantic versioning: /version-bump $ARGUMENTS
73
85
2.@ci-agent to handle CI/CD pipeline.
74
86
3. Update version in Cargo.toml using @storage-agent.
75
-
4.@docs-agent to update changelog/docs.
76
-
5.@git-handler for tagging and pushing.
77
-
6.@github agent to create a pull request from the current branch (e.g., develop) to main.
78
-
7.@github agent to merge the pull request.
79
-
8. Switch to develop branch and merge main back into it to sync changes.
80
-
9. If needed, @hive-mind-orchestrator for complex releases.
81
-
82
-
10.@github agent to monitor the GitHub Actions workflows (CI, Deploy Docs, Release) to ensure they complete successfully.
83
-
84
-
Confirm release completion.
87
+
4.@docs-agent to update changelog/docs using git-cliff for conventional commits.
88
+
5.@git-handler for committing changes and creating a release branch if needed.
89
+
6.@github agent to create a pull request from develop to main.
90
+
7.@github agent to merge the pull request (ensure main is protected and requires reviews).
91
+
8.@git-handler to tag the release on main with semantic version (e.g., v1.2.3).
92
+
9.@git-handler to push the tag, triggering GitHub Actions release workflow.
93
+
10. Switch to develop branch and merge main back into it to sync changes.
94
+
11. If needed, @hive-mind-orchestrator for complex releases.
95
+
96
+
12.@github agent to monitor the GitHub Actions workflows (CI, Deploy Docs, Release) to ensure they complete successfully. The release workflow will automatically generate changelog using git-cliff and include it in release notes.
97
+
98
+
Confirm release completion. Ensure changelog is complete by verifying conventional commit format in commits.
0 commit comments