Release

From obot-platform/discobot · View interactive version

Release is an AI agent skill from the GitHub repository obot-platform/discobot. Run the autonomous release procedure: infer the next version when needed, verify upstream main and CI, create and push the tag, update GitHub release notes, and watch the release workflow to completion.

How to use this skill

Skill file

Autonomous Release Procedure

Run a release as autonomously as possible. Treat /release as authorization to perform the normal release flow end-to-end without pausing for approval on the happy path. Keep the user informed with brief status updates, but continue automatically unless a blocking failure, missing permission, ambiguous repository state, or history-rewriting correction requires a decision.

Core Rules

Version Inference

  1. If the user provided a version or tag, use it.
  1. Otherwise, inspect recent tags with:
  1. Infer the next tag automatically:
  1. Before tagging, show the inferred version and the reason it was chosen.

Full Procedure

1. Identify the canonical remote

  1. Run git remote -v.
  2. Select the remote whose fetch URL points to obot-platform/discobot.
  3. Do not assume the remote is named origin or upstream; discover it from the URL.
  4. Fetch the latest refs before making any decisions:

2. Verify that HEAD is the upstream main commit

  1. Resolve the local and remote SHAs:
  1. If HEAD is not equal to <remote>/main:
  1. Do not proceed until this check passes.

3. Verify CI for the head commit

  1. Determine the commit SHA being released from git rev-parse HEAD.
  2. Inspect all GitHub Actions runs for that commit with gh run list --commit <sha>.
  3. For every run associated with that commit:
  1. Treat the commit as releasable only when every relevant run for that commit has concluded successfully.
  1. If there is a failure:

4. Review release changes before tagging

  1. Determine the comparison base tag:
  1. Show the commits since that comparison base with:
  1. If there is no matching previous tag in the same family, explain the fallback you are using.

5. Create and push the release tag

  1. Create an annotated tag:
  1. Record the existing workflow run IDs for the release workflow before pushing the tag.
  2. Push the tag to the canonical remote:

6. Generate changelog and release notes

  1. Generate release notes relative to the correct previous tag.
  2. Use GitHub's generated notes API when possible so the notes are based on the actual comparison range:
  1. Also capture a concise changelog from git history for the same range.
  2. Update the GitHub release for the tag with the generated notes:
  1. If the tag is an alpha, beta, or RC release, mark the GitHub release as a prerelease when updating it.

7. Watch the release workflow after tagging

  1. After the tag push, identify the new workflow run triggered by that tag.
  1. If the release workflow is queued or running, wait with:
  1. Re-check until all workflow runs triggered by the tag have completed.
  2. If the tagged release workflow succeeds:
  1. If the tagged release workflow fails:

Decision Points That Still Require the User

Ask the user only when:

Expected Commands

Use commands along these lines during the procedure:

# Determine canonical remote and current state
git remote -v
git fetch <remote> --tags
git fetch <remote> main
git rev-parse HEAD
git rev-parse <remote>/main
git tag --sort=-v:refname | head -20
git describe --tags --abbrev=0 2>/dev/null || echo "no tags"

# Inspect and wait for commit CI
gh run list --commit <sha>
gh run watch <run-id> --exit-status
gh run view <run-id>
gh run view <run-id> --log-failed

# Review release delta
git log --oneline <previous-tag>..HEAD

# Tag and publish
git tag -a <tag> -m "Release <tag>"
git push <remote> <tag>

# Generate and publish release notes
gh api repos/obot-platform/discobot/releases/generate-notes \
  -f tag_name=<tag> \
  -f target_commitish=<sha> \
  -f previous_tag_name=<previous-tag>
gh release edit <tag> --title "Discobot <tag>" --notes-file <file>

# Watch release workflow after tag push
gh run list --workflow release.yml --commit <sha>
gh run watch <run-id> --exit-status

Output Expectations

Keep the user updated with concise status updates:

Example Usage

/release
/release v1.2.3
/release v1.2.3-rc4
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.