release

Drives the release pipeline dev → staging → main → tagged release with CI gating, arming staging auto-merge automatically and stopping for the owner before main and production. Use when promoting dev

SKILL.md

GitHub

Release Promotion

Follow docs/operations/release-runbook.md. Work reaches dev by PR into dev that the agent merges once CI is green and the review is clean (/commit step 4). The owner decides when a staging PR is opened: open or update it only when the owner asks to promote (owner, 14 Nov 2026), not after each merge into dev. The owner reviews and merges into staging, and agents do not arm auto-merge. Once the owner has merged, monitor the resulting staging deployment. Main merges and production publication/deployment need separate authorization. Never bypass protection, hooks, or failing checks.

Automation: promote-staging.yml is off unless the owner sets the repository variable PROMOTE_STAGING_ENABLED to true (gh variable get PROMOTE_STAGING_ENABLED); the owner decides when staging is promoted. Only while it is true does the workflow open and auto-merge the staging PR daily, with staging-smoke.yml testing the deploy. Then do NOT open, edit or merge the staging PR; do not arm auto-merge. The remaining review is reading the staging smoke comment (or the staging-smoke issue) and the signed-in checks. Hold or turn off per docs/operations/staging-promotion-automation.md. Sections 2 below apply only when the automation is off.

1. Pre-flight Start from the current origin/dev; never push dev yourself. See docs/agents/workflow.md → Git and GitHub workflow.

Confirm the latest dev CI run on the head is green (gh run list --branch dev --limit 3); if not, triage it first. GitHub CI is the gate and the promotion PR reuses dev's results when the tree matches (scripts/ci/promotion-verified.mjs), so do not re-run pnpm check:ci or pnpm type-check locally (if a local run is ever wanted, use turbo run <task> --concurrency=2: the full run is killed by the memory cap). Run the /pre-merge checklist, read the promotion diff with migrations first, and write the release notes while CI runs. Report findings. Stop and ask if anything is red.

Every merge into dev restarts dev CI and changes an open promotion PR: land the last PRs back to back, then open the promotion PR, and hold further agent merges until the owner has merged staging.

2. dev → staging When the owner has asked to promote, create or reuse the promotion PR (gh pr create --base staging --head dev). Review its complete diff for authorized, finished work. Keep the PR body's recap current: changed, gates, outcome and friction per /commit step 7. List each contract migration in the promotion diff first, flagged ⚠ deletes or renames data with its file path and expand revision (grep -l '^CONTRACT = ' <migration files>; see docs/api/development.md). Verify dev still matches the reviewed head, then stop and tell the owner the PR is ready to merge into staging; do not merge it or arm auto-merge. GitHub merges only once the staging ruleset's required checks pass; CI Success and Build Web Apps aggregate every API and web job (see docs/operations/release-runbook.md). If dev advances, review the new head and update the recap. On failure, diagnose and fix on a task branch within scope, validate, open a PR into dev and merge it per /commit step 4, then update the staging PR. After the owner merges, monitor pipeline-staging.yml and verify its deployed SHA equals staging head. Then smoke-test what the promotion changed:

  • curl -fsS https://api.staging.barrels.gd/api/v1/utils/health-check/
  • pnpm ui:screenshots --url https://<app>.staging.barrels.gd --path / for each web app in the promoted diff (hosts in docs/ports.md); read the PNGs and treat console errors as defects. Aborted _rsc prefetches are not.
  • Probe new public API routes with curl; staging has no /docs page.
  • Pages behind sign-in: use Claude in Chrome if connected, otherwise list the exact pages for the owner (docs/agents/tool-usage.md). Report readiness for authenticated acceptance or actionable failure; do not claim acceptance from CI alone. Stay quiet while status is unchanged.

3. staging → main After staging acceptance, create/update a PR with --base main --head staging. Obtain separate authorization before merging. Remind the user: merging to main builds nothing extra and does not deploy prod.

4. Release Determine the next vX.Y.Z tag from gh release list --limit 3 (tags are three-part, e.g. v1.0.7). Draft release notes from the PRs/commits promoted. Show the exact gh release create vX.Y.Z --target main --title "vX.Y.Z" --notes "…" command and stop — the user publishes. After publish, watch pipeline-prod.yml; note that a queued deploy job usually means the self-hosted production runner is offline.

5. Verify curl -fsS https://api.barrels.gd/api/v1/utils/health-check/ and report status. List the canonical app domains from docs/deployment.md#canonical-app-domains for the user to spot-check.

Output style: one short status line per gate as you pass it. At each human gate, say exactly what to click/run and nothing else.