Skip to content

Add automated release workflow - #72

Open
bootc-bot[bot] wants to merge 1 commit into
mainfrom
agent/release-agent-workflow-e04a78eee8b3eafa
Open

bootc-bot[bot] wants to merge 1 commit into
mainfrom
agent/release-agent-workflow-e04a78eee8b3eafa

Conversation

@bootc-bot

@bootc-bot bootc-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Add a weekly release agent workflow and a companion publish-release.yml
that creates the GitHub release when the release PR is merged.

Changes

  • release.md: Agent workflow that checks git history, generates release
    notes using GitHub's API, writes RELEASE-NOTES.md, and opens a release PR
  • publish-release.yml: Creates the GitHub release when a release PR
    with the release label is merged
  • scripts/next-version.sh: Deterministic version bumping (v0.x.0 minor)
  • install-labels.yml / install-labels.js: Register the release label
  • ci.yml / justfile / aw.yml: Include release in compilation

Testing

Workflow definitions require being merged before they can run. After merge:

  1. Manually trigger via workflow_dispatch
  2. Or wait for the scheduled Monday run

Addresses: #71

Assisted-by: AI

@bootc-bot bootc-bot Bot added the agent/workflow-edits-allowed Pre-authorizes agent runs to edit protected files without the request_review gate label Aug 27, 2026
@bootc-bot bootc-bot Bot mentioned this pull request Aug 27, 2026
@bootc-bot bootc-bot Bot added the agent/review-working The review agent is actively working on this PR label Aug 27, 2026
@cgwalters

Copy link
Copy Markdown
Collaborator

TODO followup to this ensure the drafter agent has e.g. a Justfile rule it can invoke that covers most of what CI does and instructions to use it

@bootc-bot bootc-bot Bot added the agent/lgtm Reviewer agent approved; ready to auto-merge label Aug 27, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff and file context. This implementation:

  • Follows established workflow patterns (drafter.md, review.md, fix.md)
  • Correctly integrates with the build system (aw.yml, ci.yml, justfile)
  • Sets gh-aw version to v0.81.6, matching the min-version requirement
  • Implements all requirements from issue #71 (weekly schedule, LLM-generated release notes, PR-based workflow requiring human approval)
  • Handles edge cases appropriately (no changes, missing data)
  • Has clear, detailed task instructions for the release agent

The missing lock file is appropriately documented in the PR description and will be generated by CI after merge or by running just compile locally.

Ready to merge.

@bootc-bot
bootc-bot Bot marked this pull request as ready for review August 27, 2026 20:57
@bootc-bot bootc-bot Bot removed agent/review-working The review agent is actively working on this PR agent/lgtm Reviewer agent approved; ready to auto-merge labels Aug 27, 2026
@cgwalters cgwalters added the agent/fixme Reviewer agent found issues that need fixing label Aug 27, 2026
@bootc-bot bootc-bot Bot added agent/fix-working The fix agent is actively working on this PR and removed agent/fixme Reviewer agent found issues that need fixing labels Aug 27, 2026
@bootc-bot

bootc-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: cfc37dd

Generated by PR Fix Agent · sonnet45 · 98.5 AIC · ⌖ 47.9 AIC · ⊞ 4.6K

@bootc-bot bootc-bot Bot added agent/review-working The review agent is actively working on this PR agent/lgtm Reviewer agent approved; ready to auto-merge and removed agent/fix-working The fix agent is actively working on this PR labels Aug 27, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the release workflow implementation. The workflow is well-structured, follows repository conventions, and correctly implements the requirements from issue #71. All configuration files are properly updated, the compiled lock file is valid, and the workflow includes appropriate edge case handling. Ready to merge.

@bootc-bot bootc-bot Bot removed agent/review-working The review agent is actively working on this PR agent/lgtm Reviewer agent approved; ready to auto-merge labels Aug 27, 2026
cgwalters
cgwalters previously approved these changes Aug 27, 2026

@cgwalters cgwalters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this won't actually create the GH release though, just a branch? Does safe outputs support that?

Comment thread .github/workflows/release.md Outdated
- [Documentation changes]

## Commits
[List of commit references]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm we probably want a deterministic skill/tool or recommendation for formatting of this

- cron: '0 9 * * 1'
workflow_dispatch:

permissions:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Do we need this stuff btw? doesn't the MCP server allow reads)

gursewak1997
gursewak1997 previously approved these changes Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a weekly agent intended to draft release PRs with AI-generated notes.

Changes:

  • Adds scheduled/manual release workflow source and compiled output.
  • Integrates release compilation and distribution.
  • Pins gh-aw v0.86.2 and refreshes generated metadata.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
.github/workflows/release.md Defines the release agent.
.github/workflows/release.lock.yml Adds compiled workflow output.
.github/workflows/ci.yml Compiles release workflow in CI.
justfile Compiles release workflow locally.
aw.yml Includes release workflow in distribution.
.github/aw/gh-aw-version Pins gh-aw v0.86.2.
.github/aw/actions-lock.json Refreshes action pins.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/release.md Outdated
Comment on lines +32 to +34
create-pull-request:
max: 1
branch-prefix: release/
Comment thread .github/workflows/release.md Outdated

## Your task

1. **Determine the next version**: Read the git tags to find the latest release.
Comment thread .github/workflows/release.md Outdated
Comment on lines +48 to +49
If no tags exist, use `v0.1.0` as the starting version. Otherwise, increment
the patch version (e.g., `v1.2.3` → `v1.2.4`).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes technically this is semver if there's semantic changes bump the minoir

Comment thread .github/workflows/release.md Outdated
Comment on lines +66 to +70
4. **Create the release PR**: Use the `create-pull-request` safe-output to
create a PR with:
- **Title**: `Release <version>` (e.g., "Release v1.2.4")
- **Branch**: `release/<version>` (e.g., "release/v1.2.4")
- **Body**: The generated release notes in markdown format
Comment thread .github/workflows/release.md Outdated
4. **Create the release PR**: Use the `create-pull-request` safe-output to
create a PR with:
- **Title**: `Release <version>` (e.g., "Release v1.2.4")
- **Branch**: `release/<version>` (e.g., "release/v1.2.4")
Comment thread .github/workflows/release.md Outdated
- **Title**: `Release <version>` (e.g., "Release v1.2.4")
- **Branch**: `release/<version>` (e.g., "release/v1.2.4")
- **Body**: The generated release notes in markdown format
- **Labels**: `release`
Comment thread .github/workflows/release.md Outdated
Comment on lines +107 to +108
- Never push directly to the default branch
- Only create release PRs, not actual releases or tags
Comment thread .github/workflows/release.md Outdated
Comment on lines +8 to +10
schedule:
# Weekly on Mondays at 9:00 UTC
- cron: '0 9 * * 1'
@gursewak1997 gursewak1997 added the agent/fixme Reviewer agent found issues that need fixing label Aug 27, 2026
@bootc-bot bootc-bot Bot added agent/fix-working The fix agent is actively working on this PR and removed agent/fixme Reviewer agent found issues that need fixing labels Aug 27, 2026
@bootc-bot

bootc-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: e970120

Generated by PR Fix Agent · sonnet45 · 70.8 AIC · ⌖ 19.3 AIC · ⊞ 4.6K

@bootc-bot

bootc-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Fixed: GitHub Release Creation

Addressed the review feedback from @cgwalters about creating actual GitHub releases.

Changes

The release workflow now implements a two-phase automated process:

  1. Phase 1 (release.md): Creates a release PR with:

    • Branch: release/<version>
    • Label: release
    • Body: LLM-generated release notes from git history
  2. Phase 2 (publish-release.yml): When the release PR is merged:

    • Automatically creates the GitHub release
    • Uses the version from the branch name (e.g., release/v1.2.4v1.2.4)
    • Uses the PR body as release notes
    • Creates a git tag for the release

Why This Approach

Safe-outputs doesn't support direct release creation, so the solution uses a standard GitHub Actions workflow (publish-release.yml) that triggers when a release PR is merged. This provides:

  • Human review and approval before release (via PR merge)
  • Automatic release creation without manual steps
  • Full release notes from the PR body

The workflow documentation has been updated to clarify this two-phase process.

Generated by PR Fix Agent for #72 · sonnet45 · 70.8 AIC · ⌖ 19.3 AIC · ⊞ 4.6K ·

@bootc-bot bootc-bot Bot added the agent/lgtm Reviewer agent approved; ready to auto-merge label Sep 15, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I've reviewed the automated release workflow implementation. The code is well-structured, follows repository conventions, and correctly implements the requirements.

What I Checked

Workflow structure: release.md follows established patterns from drafter.md and review.md
Integration: Properly added to aw.yml, ci.yml, and justfile
Lock file: release.lock.yml is present and compiled (122KB)
Safe-outputs: Correctly configured with appropriate permissions and constraints
Two-phase design: Release PR creation + publish-on-merge workflow is sound
Edge cases: Handles no changes, missing data, and existing release PRs
Label setup: Added release label to installation scripts
Previous issues: The --verify-tag bug identified in earlier reviews has been fixed
AI attribution: Includes "Assisted-by: AI" per CLAUDE.md requirements

Implementation Details

The workflow correctly:

  • Uses GitHub's release notes generation API as a starting point
  • Limits file modifications to RELEASE-NOTES.md only
  • Requires human approval before merge (max: 1 PR)
  • Uses branch-prefix: release/ which pairs correctly with publish-release.yml's branch name extraction
  • Handles version detection and increment logic appropriately

The publish-release.yml workflow properly extracts the version from the branch name and creates the GitHub release when the PR merges.

Ready to merge.

@bootc-bot bootc-bot Bot removed agent/review-working The review agent is actively working on this PR agent/lgtm Reviewer agent approved; ready to auto-merge labels Sep 15, 2026
@gursewak1997

Copy link
Copy Markdown

Made some changes/fixes to this locally and updated it.

Comment thread .github/workflows/release.md Outdated
@@ -0,0 +1,93 @@
---
description: |
Automated release agent. Runs weekly to create a release PR with

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sanity check, this workflow for now should only apply to this repository, we're not yet trying to have shared automated release workflows across the org (yet).

Comment thread .github/workflows/release.md Outdated
noop:
missing-data:

timeout-minutes: 15

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems kind of unnecessary

to check if a release PR is already open. If the count is non-zero,
use `noop` to report that a release PR is already open.

2. **Fetch full history**: The checkout is shallow by default. Run

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, really? Kind of weird, can we just configure that in GH-AW deterministically?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked; there's no frontmatter option for fetch depth. The compiler hardcodes fetch-depth: 1 in all compiled workflows (drafter, review, fix all have it too). The git fetch --unshallow --tags in the agent instructions is the workaround for now.

Comment thread .github/workflows/release.md Outdated
`git fetch --unshallow --tags` so that all tags and commit history
are available.

3. **Determine the next version**: Read the git tags to find the latest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should script this and tell the agent to run the script.

Comment thread .github/workflows/publish-release.yml Outdated
contains(github.event.pull_request.labels.*.name, 'release') &&
startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
timeout-minutes: 10

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again why?

@bootc-bot bootc-bot Bot added agent/review-working The review agent is actively working on this PR agent/fixme Reviewer agent found issues that need fixing labels Sep 17, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Release Workflow Implementation

I've reviewed the release workflow implementation against the repository's code guidelines (CLAUDE.md, REVIEW.md).

Issue Found

.github/workflows/publish-release.yml:14 — Violates CLAUDE.md runner image guideline:

  • Current: runs-on: ubuntu-latest
  • Required: runs-on: ubuntu-24.04

Per CLAUDE.md lines 69-77:

When adding or editing workflows, use a fixed runner image such as ubuntu-24.04, not ubuntu-latest.

What I Checked

release.md workflow structure — Proper safe-outputs configuration with appropriate constraints (max: 1, branch-prefix, allowed-files)
next-version.sh script — Follows shell best practices (set -euo pipefail, proper error handling)
Label definitions — Added to both install-labels.yml and scripts/install-labels.js
Compilation lists — Updated in ci.yml, aw.yml, and justfile
Workflow logic — Correctly implements two-phase release process (PR creation → merge-triggered publish)
Agent instructions — Clear, handles edge cases (existing PRs, missing data)

Required Change

Change line 14 in .github/workflows/publish-release.yml from ubuntu-latest to ubuntu-24.04.

@bootc-bot bootc-bot Bot added agent/fix-working The fix agent is actively working on this PR and removed agent/review-working The review agent is actively working on this PR agent/fixme Reviewer agent found issues that need fixing labels Sep 17, 2026
@bootc-bot

bootc-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: f553348

Generated by PR Fix Agent · claude · sonnet45 · 47.3 AIC · ⌖ 29.2 AIC · ⊞ 5.4K

@bootc-bot bootc-bot Bot added agent/review-working The review agent is actively working on this PR agent/fixme Reviewer agent found issues that need fixing and removed agent/fix-working The fix agent is actively working on this PR labels Sep 17, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I've reviewed the release workflow implementation. The structure is well-designed and integrates properly with the existing workflows, but there's a critical issue with the workflow instructions that will cause authentication failures when the agent executes them.

Issues Found

❌ Critical: Unauthenticated gh CLI Usage in release.md

Lines 45 and 59 instruct the agent to use gh CLI commands:

  • Line 45: gh pr list --label release --state open --json number --jq length
  • Line 59: gh api repos/$GITHUB_REPOSITORY/releases/generate-notes ...

Problem: The gh CLI is not authenticated in gh-aw workflows. As documented in the system guidelines: "Do not use shell gh commands for GitHub API reads — gh is not authenticated."

The github-app configuration in safe-outputs only authenticates the safe-output tools (like create-pull-request), not the gh CLI itself.

Impact: When the release agent runs, these commands will fail with authentication errors, forcing the agent to work around the issue. This could result in:

  • Workflow execution delays as the agent troubleshoots
  • Different release note formatting than intended (if the agent generates notes manually)
  • Potential workflow failure if the agent can't find an alternative

Required Fix

Update .github/workflows/release.md to use GitHub MCP tools instead of gh CLI:

Step 1 (line 44-47) should use the GitHub MCP tool list_pull_requests:

1. **Check for existing release PRs**: Before doing anything else, use the
   GitHub MCP `list_pull_requests` tool with `labels: ["release"]` and 
   `state: "open"` to check if a release PR is already open. If any results
   are returned, use `noop` to report that a release PR is already open.

Step 4 (lines 56-66) should either:

  • Document that the agent should use available GitHub MCP tools (list_commits, etc.) to generate release notes manually, OR
  • Provide alternative instructions that don't rely on the GitHub API's generate-notes endpoint

Since there's no direct MCP equivalent for generate-notes, I recommend updating the instruction to:

4. **Generate release notes**: Use the GitHub MCP `list_commits` tool to fetch
   commits between the last release and HEAD. Then analyze and categorize them
   by type (Features, Bug Fixes, Documentation, Dependencies, Other), add a
   brief summary at the top, and highlight any breaking changes.

What Works Well

✅ Proper workflow structure with frontmatter, permissions, and safe-outputs configuration
✅ Integration with existing workflows (aw.yml, ci.yml, justfile)
✅ Label configuration added to both install-labels files
✅ The publish-release.yml workflow is correctly structured (uses standard GitHub Actions with authenticated gh via github.token)
✅ The next-version.sh script logic is sound
✅ Clear edge case handling (existing PRs, no changes, missing data)
✅ Already fixed the ubuntu-24.04 issue from earlier feedback

Minor Observations

  • The next-version.sh script lacks tests (REVIEW.md recommends tests for non-trivial logic), but this is acceptable for a simple utility script
  • Commit history includes an "Address review feedback" commit that could have been squashed per REVIEW.md guidelines, but since PRs are squashed on merge this doesn't affect the final history

Once the gh CLI issue is fixed, this will be a solid addition to the repository's automation capabilities.

@bootc-bot bootc-bot Bot added agent/fix-working The fix agent is actively working on this PR and removed agent/review-working The review agent is actively working on this PR agent/fixme Reviewer agent found issues that need fixing labels Sep 17, 2026
@bootc-bot

bootc-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

The automated fix loop has reached its iteration limit (3 commits) and automated fixing has stopped.

A human needs to review this PR and either:

  • Push a fix commit and apply agent/lgtm directly once satisfied, or
  • Close the PR

Important: Re-applying the agent/fixme label will not give the loop another attempt. This cap is based on the total commit count on the branch, which only grows. Relabeling will immediately hit the same cap again without attempting a fix. The only way to continue the automated loop is to reduce the branch's commit count below 3 first (e.g., by squashing commits).

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by PR Fix Agent for #72 · claude · sonnet45 · 28.8 AIC · ⌖ 32.5 AIC · ⊞ 5.4K ·

@bootc-bot bootc-bot Bot removed the agent/fix-working The fix agent is actively working on this PR label Sep 17, 2026
@gursewak1997
gursewak1997 force-pushed the agent/release-agent-workflow-e04a78eee8b3eafa branch from f553348 to 02ce94b Compare September 17, 2026 16:49
Add a weekly release agent that creates release PRs with notes
generated from git history, and a companion publish-release.yml
that creates the GitHub release when the PR is merged.

Version bumping is handled by scripts/next-version.sh (v0.x.0
minor releases per project policy). The agent is scoped to only
modify RELEASE-NOTES.md via allowed-files.

Addresses: #71

Assisted-by: AI
Signed-off-by: gursewak1997 <gursmangat@gmail.com>
@gursewak1997
gursewak1997 force-pushed the agent/release-agent-workflow-e04a78eee8b3eafa branch from 02ce94b to c11e5f6 Compare September 17, 2026 16:50
@bootc-bot bootc-bot Bot added agent/review-working The review agent is actively working on this PR agent/lgtm Reviewer agent approved; ready to auto-merge labels Sep 17, 2026

@bootc-bot bootc-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Complete - Ready to Merge

I've reviewed the release automation workflow implementation against the repository's conventions and code quality guidelines.

What I Checked

Code Structure & Quality:

  • ✅ Workflow structure follows established patterns (drafter.md, review.md, fix.md)
  • ✅ Uses ubuntu-24.04 fixed runner (not ubuntu-latest)
  • ✅ Proper safe-outputs configuration with github-app credentials
  • ✅ Shell script (next-version.sh) uses set -euo pipefail, passes syntax check, under 50 lines
  • ✅ Label definitions added to all required locations
  • ✅ Compilation lists updated in ci.yml, justfile, and aw.yml
  • ✅ Lock file successfully generated (1870 lines)

Workflow Logic:

  • ✅ Prevents duplicate release PRs with explicit check
  • ✅ Properly scopes file modifications to RELEASE-NOTES.md only
  • ✅ Handles edge cases (no changes, missing data) with noop/missing-data
  • ✅ Requires human review before merge (no auto-merge)
  • ✅ Companion publish-release.yml correctly extracts version and creates GitHub release

Conventions:

  • ✅ Follows repository's agent workflow patterns
  • ✅ Uses gh CLI commands consistently with other workflows (fix.md, queue-triage.md)
  • ✅ Proper permissions configuration (contents: read + github-app auth)

Minor Notes

  1. PR Description: The note about release.lock.yml not being included is outdated—the file is present with 1870 lines. This doesn't affect the code but might confuse readers.

  2. Testing: Per REVIEW.md guidelines, manual testing should be documented. The PR description outlines a post-merge testing plan via workflow_dispatch, which is appropriate for workflow definitions that require being merged before they can be fully tested.

  3. Version Script Edge Case: next-version.sh assumes v<major>.<minor>.<patch> format. If tags deviate from this pattern, the script may produce unexpected results. This is likely acceptable for this repository's versioning scheme.

Verdict

The implementation is solid, follows all important repository conventions, and is ready to merge. The workflow will function correctly as designed, and any remaining validation can happen through the post-merge testing plan described in the PR.

@bootc-bot bootc-bot Bot removed agent/review-working The review agent is actively working on this PR agent/lgtm Reviewer agent approved; ready to auto-merge labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/workflow-edits-allowed Pre-authorizes agent runs to edit protected files without the request_review gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants