Skip to content

GitHub Action

Git-Iris is available as a GitHub Action for automating release notes, changelogs, and other Git artifacts directly in your CI/CD pipelines.

Quick Start

yaml
- name: Generate Release Notes
  uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    to: v2.0.0
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    output-file: RELEASE_NOTES.md

Inputs

InputDescriptionRequiredDefault
commandCommand to run: release-notes, changelogNorelease-notes
fromStarting Git reference (tag, commit, or branch)Yes-
toEnding Git referenceNoHEAD
providerLLM provider: openai, anthropic, googleNoopenai
modelModel to use (provider-specific)NoProvider default
api-keyAPI key for the LLM providerYes-
output-fileFile path to write outputNo-
version-nameExplicit version name to use in outputNo-
custom-instructionsCustom instructions for generationNo-
update-filePrepend to existing file (changelog only)Nofalse
versionGit-Iris version to useNolatest
build-from-sourceBuild from source instead of binaryNofalse
binary-pathPath to pre-built binaryNo-

Outputs

OutputDescription
contentGenerated content as a string
output-filePath to the output file (if specified)

Examples

Generate Release Notes for a Tag

yaml
name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Get previous tag
        id: prev_tag
        run: |
          PREV=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
          echo "tag=$PREV" >> $GITHUB_OUTPUT

      - name: Generate Release Notes
        id: notes
        uses: hyperb1iss/git-iris@v2
        with:
          command: release-notes
          from: ${{ steps.prev_tag.outputs.tag }}
          to: ${{ github.ref_name }}
          version-name: ${{ github.ref_name }}
          provider: anthropic
          model: claude-sonnet-4-5-20250929
          api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          output-file: RELEASE_NOTES.md

      - name: Create GitHub Release
        uses: softprops/action-gh-release@v2
        with:
          body_path: RELEASE_NOTES.md

Update CHANGELOG.md

yaml
- name: Update Changelog
  uses: hyperb1iss/git-iris@v2
  with:
    command: changelog
    from: v1.0.0
    to: HEAD
    version-name: "2.0.0"
    provider: openai
    api-key: ${{ secrets.OPENAI_API_KEY }}
    output-file: CHANGELOG.md
    update-file: "true"  # Prepends to existing CHANGELOG.md

Use with Different Providers

OpenAI

yaml
- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: openai
    model: gpt-4o
    api-key: ${{ secrets.OPENAI_API_KEY }}

Anthropic

yaml
- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: anthropic
    model: claude-sonnet-4-5-20250929
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Google

yaml
- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: google
    model: gemini-2.0-flash
    api-key: ${{ secrets.GOOGLE_API_KEY }}

Custom Instructions

yaml
- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    custom-instructions: |
      Focus on user-facing changes.
      Use simple language suitable for non-technical users.
      Group changes by feature area.

Use Output in Subsequent Steps

yaml
- name: Generate Notes
  id: notes
  uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Use Generated Content
  run: |
    echo "Generated content:"
    echo "${{ steps.notes.outputs.content }}"

Pin to Specific Version

yaml
- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    version: v2.0.0  # Use specific git-iris version

Supported Platforms

The action automatically downloads the appropriate binary for your runner:

RunnerArchitectureBinary
ubuntu-latestx64git-iris-linux-amd64
ubuntu-24.04-armARM64git-iris-linux-arm64
macos-latestARM64git-iris-macos-arm64
windows-latestx64git-iris-windows-gnu.exe

Tips

Fetch Full History

The action needs access to the Git history between your from and to references:

yaml
- uses: actions/checkout@v4
  with:
    fetch-depth: 0  # Fetch all history for all tags and branches

Store API Keys Securely

Always use GitHub Secrets for API keys:

  1. Go to your repository Settings > Secrets and variables > Actions
  2. Click "New repository secret"
  3. Add your provider's API key (e.g., ANTHROPIC_API_KEY)

Build from Source (Advanced)

If you need the latest features or encounter issues with the binary:

yaml
- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    build-from-source: "true"

WARNING

Building from source significantly increases workflow time (~2-3 minutes for compilation).

Use Pre-built Binary

If you've already built git-iris in a previous step:

yaml
- name: Build git-iris
  run: cargo build --release

- uses: hyperb1iss/git-iris@v2
  with:
    command: release-notes
    from: v1.0.0
    provider: anthropic
    api-key: ${{ secrets.ANTHROPIC_API_KEY }}
    binary-path: ./target/release/git-iris

Released under the Apache 2.0 License.