Automated GitHub Action to keep your CITATION.cff file up-to-date by extracting authors from multiple sources.
Available on GitHub Marketplace: CFFBump
- Extract authors from AUTHORS.md, git history, and Crossref (DOI lookups)
- Automatic semantic version bumping (patch)
- Preserves existing metadata (ORCID, email, affiliation)
- Configurable via YAML or workflow inputs
# Authors
- Alice Johnson
- Bob Smith (bob@example.com)Create cffbump.config.yaml:
include_sources: [md, git, crossref]
git_min_commits: 2
doi: "10.1371/journal.pone.0021373"Or configure via workflow inputs:
- uses: btraven00/cffbump@v1
with:
git-min-commits: '2'
include-sources: 'md,git,crossref'
doi: '10.1371/journal.pone.0021373'Create .github/workflows/cffbump.yaml:
name: Update CITATION.cff
on:
push:
branches:
- main
jobs:
update-cff:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: btraven00/cffbump@v1
with:
git-min-commits: '2'
include-sources: 'md,git,crossref'
doi: '10.1371/journal.pone.0021373' # optionalThe action will commit and push the updated CITATION.cff automatically. The permissions: contents: write is required for the push to succeed.
You can also trigger on releases or tags instead of every push:
on:
release:
types: [published]
# or
on:
push:
tags: ['v*']- Extract authors from enabled sources
- Deduplicate by exact family name + given names
- Merge with existing CITATION.cff (preserving hand-edited data)
- Bump patch version
- Commit and push
| Option | Default | Description |
|---|---|---|
include_sources |
[md, git, crossref] |
Sources to extract from |
git_min_commits |
2 |
Min commits to include git author |
doi |
- | DOI for Crossref API |
date_filter |
- | Filter git history by date |
Authors match if they have the same family name AND:
- Same given names (exact), OR
- One is missing given names, OR
- One has initials matching the other's full name
Examples:
- ✅
Alice Johnson=Alice Johnson - ✅
Alice Johnson=A. Johnson - ✅
Alice Bob Smith=A. B. Smith - ✅
Alice Johnson=Johnson - ❌
Alice Johnson≠Bob Johnson - ❌
A. Johnson≠B. Johnson
python3 test_cffbump.py
python3 .github/scripts/cffbump.pyPublic domain under the Unlicense. See LICENSE.