repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

.github/workflows/adw-release.yml

Raw
File outline
# ADW release — on a `v*` tag (the owner's one release touchpoint), release-manager
# drafts notes from merged PRs, verifies the §14 target matrix, and publishes a
# GitHub Release. The action can't serve `push` (p35), so a tag push is relayed to
# a workflow_dispatch — the automation event the action does serve — exactly like
# adw-plan.
name: adw-release

on:
  push:
    tags: ["v*"]
  workflow_dispatch:
    inputs:
      tag:
        description: "the v* tag to release"
        required: true

permissions:
  contents: write

jobs:
  # push can't run the action, so it just hands off to the automation event.
  dispatch:
    if: github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - id: token
        uses: actions/create-github-app-token@v1
        with:
          app-id: ${{ secrets.APP_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}
      - env:
          GH_TOKEN: ${{ steps.token.outputs.token }}
        run: gh workflow run adw-release.yml -R ${{ github.repository }} -f tag=${{ github.ref_name }}

  release:
    if: github.event_name == 'workflow_dispatch'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - id: token
        uses: actions/create-github-app-token@v1
        with:
          app-id: ${{ secrets.APP_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}
      - uses: anthropics/claude-code-action@v1
        with:
          github_token: ${{ steps.token.outputs.token }}
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          prompt: |
            Use the release-manager subagent on ${{ github.repository }} for tag
            ${{ github.event.inputs.tag }}. Follow .claude/agents/release-manager.md:
            draft notes from the PRs merged since the previous tag, verify the SPEC
            §14 target matrix still cross-builds, and publish a GitHub Release for
            the tag. Releases, not Packages. Do not move the tag or edit the spec.
            Think.
          claude_args: --model claude-sonnet-5 --dangerously-skip-permissions