Skip to content

Commit 78417f9

Browse files
committed
docs(workflow): Add GitHub release step to build workflow
1 parent a2d384f commit 78417f9

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

.workflows/WF-CREATE-ROO-CMD-BUILD-001.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ scope = "Applies when preparing a new distributable release of the Roo Commander
2323
roles = [
2424
"Coordinator (Roo Commander)",
2525
"Executor (Terminal via `execute_command`)",
26-
"Technical Writer (Optional, for CHANGELOG)"
26+
"Technical Writer (Optional, for CHANGELOG)",
27+
"Executor (GitHub CLI via `execute_command`)"
2728
]
2829
trigger = "Manual initiation by the Coordinator when a new build is required."
2930
success_criteria = [
@@ -32,15 +33,19 @@ success_criteria = [
3233
"The archive contains a `README.md` with setup instructions.",
3334
"The archive contains an up-to-date `CHANGELOG.md`.",
3435
"The `.builds/README.md` log file is updated with the details of the new build.",
35-
"The build script (if used) executes successfully (exit code 0)."
36+
"The build script executes successfully (exit code 0).",
37+
"A GitHub release is created with the correct tag, title, notes, and attached build artifact.",
38+
"The `gh release create` command executes successfully (exit code 0)."
3639
]
3740
failure_criteria = [
3841
"The build script (if used) fails or produces errors.",
3942
"The zip archive is not created or is placed in the wrong location.",
4043
"The zip archive has an incorrect name.",
4144
"The contents of the zip archive are incorrect (missing files, includes excluded files).",
4245
"The `README.md` or `CHANGELOG.md` within the archive is missing or incorrect.",
43-
"The `.builds/README.md` log file is not updated or contains errors."
46+
"The `.builds/README.md` log file is not updated or contains errors.",
47+
"The GitHub release creation fails.",
48+
"The build artifact upload fails."
4449
]
4550

4651
# --- Integration ---
@@ -78,12 +83,13 @@ validation_notes = "Workflow needs implementation and testing, potentially invol
7883
## 5. Reference Documents & Tools 📚🛠️
7984
* `.builds/README.md`: Log file for build history.
8085
* `.docs/standards/roo-commander-version-naming-convention.md`: Defines version numbers and codenames.
81-
* `create_build.[sh|js]` (Hypothetical): The script automating the build process.
82-
* `CHANGELOG.md` (Template/Previous Version): Used as a basis for the new changelog.
83-
* `README.dist.md` (Hypothetical Template): Template for the `README.md` to be included *inside* the zip.
84-
* `execute_command`: Tool to run the build script/commands.
86+
* `create_build.js`: The script automating the build process.
87+
* `.tmp/CHANGELOG.md`: Temporary file holding the changelog for the current build.
88+
* `.tmp/README.md`: Temporary file holding the distribution README for the current build.
89+
* `gh` (GitHub CLI): Tool for interacting with GitHub, specifically for creating releases.
90+
* `execute_command`: Tool to run the build script and `gh` commands.
8591
* `read_file`: Tool to read version info, changelogs, build logs.
86-
* `write_to_file`: Tool to create/update build log, potentially the distribution README/CHANGELOG if not scripted.
92+
* `write_to_file`: Tool to create temporary README/CHANGELOG files.
8793
* `append_to_file`: Tool to add entries to the build log.
8894
* `list_files`: Tool to verify script existence or build output.
8995
* `technical-writer` (Mode): Optional delegate for `CHANGELOG.md` creation/update.
@@ -145,15 +151,35 @@ validation_notes = "Workflow needs implementation and testing, potentially invol
145151
* **Outputs:** Updated `.builds/README.md`.
146152
* **Error Handling:** If writing/appending fails, report the error.
147153

154+
* **Error Handling:** If writing/appending fails, report the error.
155+
156+
* **Step 6: Create GitHub Release (Coordinator delegates to Executor via `execute_command`)**
157+
* **Description:** Create a new release on GitHub and upload the build artifact.
158+
* **Tool:** `execute_command` (using `gh` CLI)
159+
* **Inputs Provided by Coordinator:**
160+
* `BUILD_VERSION` (e.g., "v7.0.3")
161+
* Target Repository (e.g., `jezweb/roo-commander`)
162+
* Release Title (e.g., `v7.0.3 (Wallaby)`)
163+
* Path to temporary CHANGELOG file (e.g., `.tmp/CHANGELOG.md`)
164+
* Path to the build artifact zip file (e.g., `.builds/${ARCHIVE_NAME_STEM}.zip`)
165+
* **Command Example:** `gh release create ${BUILD_VERSION} --repo jezweb/roo-commander --title "${BUILD_VERSION} (${BUILD_CODENAME})" --notes-file .tmp/CHANGELOG.md .builds/${ARCHIVE_NAME_STEM}.zip`
166+
* **Instructions for Executor:** Execute the provided `gh release create` command.
167+
* **Expected Output from Executor:** URL of the created release, exit code 0.
168+
* **Coordinator Action (Post-Execution):** Review output and exit code.
169+
* **Validation/QA:** Check for success messages (URL output), non-zero exit code. Verify the release exists on GitHub with the correct tag, title, notes, and attached asset.
170+
* **Error Handling:** If the `gh` command fails, analyze output. Check authentication (`gh auth status`), repository name, tag existence, file paths, and permissions. Report failure or attempt troubleshooting.
171+
148172
## 7. Postconditions ✅
149173
* A correctly named and structured zip archive exists in `.builds/`.
150174
* The `.builds/README.md` file contains an entry for the new build.
175+
* A corresponding release exists on GitHub with the build artifact attached.
151176

152177
## 8. Error Handling & Escalation (Overall) ⚠️
153178
* If the build script fails, debug the script.
154179
* If file operations fail, check permissions and paths.
155180
* If versioning information is inconsistent, review `.builds/README.md` and the versioning standard document.
156-
* Escalate to the user if the build cannot be completed successfully.
181+
* If the GitHub release creation fails, check `gh` CLI authentication, command syntax, and network connectivity.
182+
* Escalate to the user if the build or release cannot be completed successfully.
157183

158184
## 9. PAL Validation Record 🧪
159185
* Date Validated: (Pending Implementation)
@@ -162,4 +188,5 @@ validation_notes = "Workflow needs implementation and testing, potentially invol
162188
* Findings/Refinements:
163189

164190
## 10. Revision History 📜
191+
* v1.1 (2025-04-20): Added Step 6 for GitHub Release creation using `gh` CLI. Updated roles, criteria, and tools list.
165192
* v1.0 (2025-04-20): Initial draft incorporating versioning, build log, CHANGELOG, distribution README, and suggestion for an automated build script.

0 commit comments

Comments
 (0)