# Buildkite Agent Metrics Release

> Prepare a release for buildkite-agent-metrics. Use when this capability is needed.

- Skill: `tomevault-io/buildkite-agent-metrics-release` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/buildkite-agent-metrics-release`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/buildkite-agent-metrics-release/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/buildkite-agent-metrics-release

---


# buildkite-agent-metrics Release

## When to Use This Skill

Use this skill when you need to cut a new release of buildkite-agent-metrics.

## Instructions

### 1. Make sure the working tree is up to date with `main`

```bash
git fetch origin
git switch main
git pull --ff-only
```

### 2. Decide the new version

Find the latest release:

```bash
gh release view --repo buildkite/buildkite-agent-metrics --json tagName,publishedAt
```

Ask the user whether this is a major, minor, or patch bump. Use the bare semver (e.g. `5.13.0`), not a `v`-prefixed tag.

### 3. Bump the version

Edit [`version/version.go`](../../../version/version.go) and set `const Version = "X.Y.Z"` to the new version.

### 4. Preview the auto-generated release notes

This is a read-only API call — it does not create a release or tag. GitHub auto-detects the previous release and applies categorisation from [`.github/release.yml`](../../../.github/release.yml).

```bash
notes_file=$(mktemp)
gh api -X POST repos/buildkite/buildkite-agent-metrics/releases/generate-notes \
  -f tag_name=vX.Y.Z \
  -f target_commitish=main \
  --jq .body > "$notes_file"
cat "$notes_file"
```

Inspect the output. If any PRs are mis-categorised (e.g. landed under 🏠 Internal because they had no category label), fix the labels on those PRs via `gh pr edit <num> --add-label feature` and re-run the command. The notes are regenerated at release time from current labels.

### 5. Open the release PR

* Create a branch: `git switch -c release/vX.Y.Z`.
* Commit the `version/version.go` change with message `release: vX.Y.Z`.
* Push and open the PR. The `release` label is required: it satisfies the PR-labels workflow and excludes this PR from its own auto-generated notes (configured in [`.github/release.yml`](../../../.github/release.yml)).
  ```bash
  gh pr create \
    --title "release: vX.Y.Z" \
    --body-file "$notes_file" \
    --label release
  ```

The PR body is for human review. The actual release notes are regenerated by `gh release create --generate-notes` in [`.buildkite/steps/release-github.sh`](../../../.buildkite/steps/release-github.sh) when the release pipeline runs, so they will reflect any label fixes made between PR creation and release.

### 6. Merge the PR

Wait for CI to pass, then merge via the GitHub UI or `gh pr merge --squash`.

### 7. Done

That's it. The [main pipeline](https://buildkite.com/buildkite/buildkite-agent-metrics) build that runs against the merge commit detects the version bump in `version/version.go`, triggers the release pipeline, and `gh release create` creates the tag and publishes the release with auto-generated notes.

Spot-check the published release on the [Releases page](https://github.com/buildkite/buildkite-agent-metrics/releases) when it appears.

---
> Source: [buildkite/buildkite-agent-metrics](https://github.com/buildkite/buildkite-agent-metrics) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-07-04 -->

