earl 0.6.4

AI-safe CLI for AI agents
name: Release Notes

on:
  workflow_dispatch:
    inputs:
      tag:
        description: Existing release tag
        required: true
        type: string

concurrency:
  group: release-notes-${{ inputs.tag }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  enhance:
    name: Update release notes
    runs-on: ubuntu-latest
    timeout-minutes: 5
    environment: release
    permissions:
      contents: write
    steps:
      - name: Generate notes for the existing release
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GH_REPO: ${{ github.repository }}
          RELEASE_TAG: ${{ inputs.tag }}
        run: |
          gh release view "$RELEASE_TAG" --repo "$GH_REPO" >/dev/null
          gh api --method POST "repos/$GH_REPO/releases/generate-notes" \
            -f tag_name="$RELEASE_TAG" --jq .body > release-notes.md
          gh release edit "$RELEASE_TAG" --repo "$GH_REPO" --notes-file release-notes.md