name: Release Notes
on:
workflow_dispatch:
inputs:
tag:
description: "Release tag (e.g. v0.8.0)"
required: true
type: string
concurrency:
group: release-notes-${{ github.event.inputs.tag }}
cancel-in-progress: true
jobs:
enhance:
name: Enhance release notes with Claude
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with:
fetch-depth: 0
- name: Write release notes with Claude
uses: anthropics/claude-code-action@26ec041249acb0a944c0a47b6c0c13f05dbc5b44 with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
claude_args: --allowedTools "Bash(git log:*),Bash(git describe:*),Read,Write"
prompt: |
Write an exciting, polished GitHub release body for addr-spec ${{ inputs.tag }} and save it to `release-notes.md`.
addr-spec is a Rust library for parsing RFC 5321 and RFC 5322 email address specifications. It provides zero-copy parsing of email addresses, mailboxes, and address groups with full spec compliance.
Steps:
1. Run `git describe --tags --abbrev=0 HEAD^` to get the previous tag, then run `git log <previous-tag>..HEAD --oneline` to see all commits in this release.
2. Read `src/lib.rs` and relevant source files to understand the API surface.
3. Write the release body to `release-notes.md`. It should:
- Open with an enthusiastic one-paragraph summary of what's new or why this release is exciting.
- Have clearly labelled sections (e.g. **✨ New Features**, **🐛 Bug Fixes**, **⚡ Improvements**) — only include sections that actually have content.
- For any significant new feature, include a short Rust example snippet showing it in action.
- End with an installation snippet (add `addr-spec = "${{ inputs.tag }}"` to `Cargo.toml`, stripping the leading `v`).
- Be written in an upbeat, developer-friendly tone — celebrate the work!
Do NOT publish it yourself — a subsequent step will do that.
- name: Publish release notes
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b with:
tag_name: ${{ inputs.tag }}
body_path: release-notes.md